TCPIP_UDP_IsConnected Function

C

bool TCPIP_UDP_IsConnected(UDP_SOCKET hUDP); 

Description

This function determines if a socket has an established connection to a remote node. Call this function after calling TCPIP_UDP_ServerOpen/TCPIP_UDP_ClientOpen to determine when the connection is set up and ready for use.

Remarks

An UDP server or client socket can always send data, as long as it has a valid destination address, even if there's no remote socket connected to it. This function will return true if the socket is opened and currently has a valid destination. Note that this is true if a client socket was opened with a remote host address, a socket received data from a remote host, or a explicit remote bind was done.

Preconditions

None.

Parameters

ParametersDescription
hUDPThe socket to check.