System.Win.ScktComp.TCustomServerSocket.OnClientError

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnClientError: TSocketErrorEvent read GetOnClientError write SetOnClientError;

C++

__property TSocketErrorEvent OnClientError = {read=GetOnClientError, write=SetOnClientError};

Properties

Type Visibility Source Unit Parent
event protected
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TCustomServerSocket

Description

Occurs when there is a failure in establishing, using, or terminating the socket connection to an individual client socket.

Write an OnClientError event handler to respond to errors that arise with a connection to an individual client. Set the ErrorCode parameter to 0 if the OnClientError event handler successfully deals with the error condition to prevent an ESocketError from being raised.

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

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

See Also