ClientHandle Property  
 

Return the socket handle associated with a specific client session.

Syntax

object.ClientHandle(Index)

Remarks

The ClientHandle property is read-only, zero-based property array that returns the socket handle allocated for the client session specified by the Index parameter. An exception will be thrown if the index value exceeds the maximum number of active client sessions. To determine the number of clients that are currently connected to the server, use the ClientCount property.

You should always check the value of the ClientCount property prior to enumerating through the client connections using the ClientHandle property array. Never assume that a particular client session will always be found in the same position in the property array. The socket handles returned by the property array can be used in conjunction with the Read and Write methods to exchange data with a particular client session outside of an event handler.

Data Type

Integer (Int32)

See Also

ClientHandle Property, Disconnect Method, FindClient Method, Read Method, Write Method, OnConnect Event, OnRead Event