System.Win.ScktComp.TWinSocketStream.Create

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

__fastcall TWinSocketStream(TCustomWinSocket* ASocket, System::LongInt TimeOut);

Properties

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

Description

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