RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomWinSocket.Create Constructor

Creates an instance of TCustomWinSocket from a Windows socket handle.

Pascal
constructor Create(ASocket: TSocket);
C++
__fastcall TCustomWinSocket(TSocket ASocket);

Call Create to create a Windows socket object. Most Windows socket objects are created automatically by the socket component that uses them. Applications may create their own Windows socket objects in an OnGetSocket event handler for a server socket component. 

After calling the inherited constructor, Create 

Makes sure that Winsock.dll is initialized. 

Allocates helper objects to manage multithreading issues. 

Initializes ASyncStyles to [asRead, asWrite, asConnect, asClose] 

Initializes the SocketHandle property to the ASocket parameter and sets the Connected property to reflect whether ASocket is the handle of a valid open Windows socket. 

Initializes the Addr property. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!