System.Win.ScktComp.TServerSocket.OnClientDisconnect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnClientDisconnect;

C++

__property OnClientDisconnect;

Properties

Type Visibility Source Unit Parent
event published
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TServerSocket

Description

Occurs when one of the connections to a client socket is closed.

System.Win.ScktComp.TServerSocket.OnClientDisconnect inherits from System.Win.ScktComp.TCustomServerSocket.OnClientDisconnect. All content below this line refers to System.Win.ScktComp.TCustomServerSocket.OnClientDisconnect.

Occurs when one of the connections to a client socket is closed.

Write an OnClientDisconnect event handler to take specific action when the connection to a client socket is ending. The termination of a client connection does not close the server socket. The server socket remains open and listening for client requests on its listening connection.

The TServerClientWinSocket that describes the server endpoint of the client connection is freed after OnClientDisconnect. If ServerType is stThreadBlocking, OnThreadEnd occurs after OnClientDisconnect.

Note: If ServerType is stThreadBlocking, make sure that all code in an OnClientDisconnect event handler is thread-safe. Use the GetClientThread method of the Sender parameter to access thread-specific information.

Note: The OnClientDisconnect event handler for TServerSocket is also set when setting the OnClientDisconnect event handler of the associated TServerWinSocket.

See Also