RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWinSocketStream.Create Constructor

Creates an instance of TWinSocketStream for a Windows socket object.

Pascal
constructor Create(ASocket: TCustomWinSocket; TimeOut: Longint);
C++
__fastcall TWinSocketStream(TCustomWinSocket ASocket, Longint TimeOut);

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!