System.Win.ScktComp.TCustomWinSocket.Read
Delphi
procedure Read(Socket: TSocket); virtual;
C++
virtual void __fastcall Read(NativeInt Socket);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Win.ScktComp.pas System.Win.ScktComp.hpp |
System.Win.ScktComp | TCustomWinSocket |
Description
Generates an OnSocketEvent of type seRead in response to notifications that the socket connection is ready.
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.