RAD Studio |  |

Getting Information About the Client or Server Socket Connection
See Also
Collapse All

After completing the connection to a client or server socket, you can use the client or server socket object associated with your socket component to obtain information about the connection. Use the LocalHost and LocalPort properties to determine the address and port number used by the local client or server socket, or use the RemoteHost and RemotePort properties to determine the address and port number used by the remote client or server socket. Use the GetSocketAddr method to build a valid socket address based on the host name and port number. You can use the LookupPort method to look up the port number. Use the LookupProtocol method to look up the protocol number. Use the LookupHostName method to look up the host name based on the host machine's IP address.

To view network traffic in and out of the socket, use the BytesSent and BytesReceived properties.

See Also

Specifying the Desired Server

Forming the Connection

Reading and Writing Over Socket Connections

Closing the Connection

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!