System.Win.ScktComp.TCustomWinSocket.Create

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

constructor Create(ASocket: TSocket);

C++

__fastcall TCustomWinSocket(NativeInt ASocket);

Properties

Type Visibility Source Unit Parent
constructor public
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TCustomWinSocket

Description

Creates an instance of TCustomWinSocket from a Windows socket handle.

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.

See Also