Connecting a socket
Before a TCP socket can be used to communicate with a remote application, it must establish a logical connection with it. According to the TCP protocol, the connection establishment process lies in exchanging of service messages between two applications, which, if succeeds, results in two applications being logically connected and ready for communication with each other.
Roughly, the connection establishment process looks like this. The client application, when it wants to communicate with the server application, creates and opens an active socket and issues a connect()
command on it, specifying a target server application with an endpoint object. This leads to a connection establishment request message being sent to the server ...
Get Boost.Asio C++ Network Programming Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.