Catalyst File Transfer .NET

FileTransfer.Handle Property

Gets a value that specifies the client handle allocated for the current session.

[Visual Basic]
Public ReadOnly Property Handle As Integer
[C#]
public int Handle {get;}

Property Value

An integer which represents a client handle. If there is no active connection, a value of -1 is returned.

Remarks

The Handle property specifies the numeric descriptor of the current client client session and is typically used for debugging or diagnostic purposes.

In SocketTools, handles are used to identify client sessions. A session begins when an instance of the class is used to establish a connection with the server and ends when that connection is terminated. The client handle is defined as an integer type and is used internally to reference the active session. When the connection is terminated, the handle is released, along with any system resources that were allocated for it. An unused handle is identified by the value -1.

It is important to note that the handles returned by this property are not socket handles and cannot be used interchangeably with other objects or Windows API functions. The actual value of the handle is only unique while the client session is active and handle values may be reused. An application should never depend on the Handle property returning a specific value.

See Also

FileTransfer Class | SocketTools Namespace