System.Win.ScktComp.TGetSocketEvent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TGetSocketEvent = procedure (Sender: TObject; Socket: TSocket;
var ClientSocket: TServerClientWinSocket) of object;

C++

typedef void __fastcall (__closure *TGetSocketEvent)(System::TObject* Sender, int Socket, TServerClientWinSocket* &ClientSocket);

Properties

Type Visibility Source Unit Parent
type
typedef
public
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp System.Win.ScktComp

Description

The type for event handlers that respond to events during the expected course of forming or using a socket connection.

The Sender parameter is the socket component or Windows socket object to which the event occurred.

The Socket parameter is the TSocket object that represents the endpoint of the connection.

When the event handler belongs to a client Windows socket object, these two parameters are the same. For server Windows socket objects, the Sender parameter represents the listening connection while the Socket parameter represents a client connection.

The ClientSocket parameter specifies the TServerClientWinSocket object created when a client socket connection is accepted by a listening server socket.

Applications can create and customize the properties of a TServerClientWinSocket object in an OnGetSocket event handler of the TServerClientWinSocket type.

See Also