For TCP sockets, an active connection is made to the remote host. When the socket call completes successfully, the socket is ready to send and receive data. To form a connection, the protocol must establish a network interface and a route to the destination. For details of this process, and further return values for RSocket::Connect()
.
As UDP is a connectionless protocol, Connect()
does not have to be called before writing data with RSocket::SendTo()
. It can be used to set the address for all data sent from the socket, in which case Send()/Write()
may be used in addition to SendTo()
.
Cancel an outstanding connect operation to a remote host with RSocket::CancelConnect()
. The call also cancels any outstanding RSocket::Ioctl()
calls.
After this call, a socket can be reconnected by RSocket::Connect()
.
A connection request to a listening socket can be accepted with RSocket::Accept()
. A aConnectData
argument cannot be specified.
Use RSocket::Shutdown()
to asynchronously shut down a TCP. Disconnection data is not supported.
The following table describes the effects of different types of shut down for TCP:
|