From RAD Studio API Documentation
Jump to: navigation, search


constructor Create(ASocket: TCustomWinSocket; TimeOut: Longint);


__fastcall TWinSocketStream(TCustomWinSocket* ASocket, int TimeOut);


Type Visibility Source Unit Parent
constructor public
System.Win.ScktComp TWinSocketStream


Creates an instance of TWinSocketStream for a Windows socket object.

Call Create to obtain an instance of TWinSocketStream for reading from or writing to the socket connection represented by the ASocket parameter. ASocket should be the endpoint of an open blocking socket connection to another Windows socket.

Create associates the stream with the socket connection, and allocates helper objects to allow it to determine when the socket connection is ready for reading or writing. The TimeOut property (the number of milliseconds before a read or write operation aborts) is initialized to the value of the TimeOut parameter.

If ASocket represents a non-blocking socket connection, Create raises an ESocketError exception.

See Also