RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomWinSocket.Read Method

Generates an OnSocketEvent of type seRead in response to notifications that the socket connection is ready.

Pascal
procedure Read(Socket: TSocket); virtual;
C++
virtual __fastcall Read(TSocket Socket);

Read is called in response to asynchronous notifications that the socket connection is ready for reading. The Windows socket can then read from the connection in the OnSocketEvent event handler or the socket component can read from the connection in an OnRead or OnClientRead event handler. The event handler can use the ReceiveBuf method or the ReceiveText method to read the information from the connection.

Note: Read is only called for asynchronous read notifications in a non-blocking socket. Blocking sockets must use a TWinSocketStream object for reading. The TWinSocketStream object waits for the remote socket to be ready before transferring information.
 

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