boost::system::error_code error; const boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(error);
I'm using this code to get the IP from the socket and i want to know since this code is called from multiple threads if it need a mutex lock. The socket object is used by others threads in calls to async_write, async_read, socket.shutdown and socket.close. Currently there is a mutex lock around that call which is used everytime a call is made using the socket object but i want to remove the mutex lock so there is less multi-thread interference.