System.Win.ScktComp.TServerClientWinSocket.Create
Delphi
constructor Create(Socket: TSocket; ServerWinSocket: TServerWinSocket);
C++
__fastcall TServerClientWinSocket(int Socket, TServerWinSocket* ServerWinSocket);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | System.Win.ScktComp.pas System.Win.ScktComp.hpp |
System.Win.ScktComp | TServerClientWinSocket |
Description
Creates and initializes an instance of TServerClientWinSocket.
Use Create to create an instance of TServerClientWinSocket in the OnGetSocket event handler of a server socket component. The Socket parameter is the Windows socket handle for the accepted socket connection to a client socket. The ServerWinSocket parameter is the Windows socket object for the listening connection that accepted the connection to the client socket.
Create adds the new TServerClientWinSocket object to the list of connections maintained by the listening server socket. It then sets the OnSocketEvent event handler so that notifications from the connection to the client can be passed on to the server socket. After setting up the connection to the server socket, Create calls the inherited constructor.