API:System.Win.ScktComp.TClientSocket.OnRead
Delphi
property OnRead: TSocketNotifyEvent read FOnRead write FOnRead;
C++
__property OnRead;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | System.Win.ScktComp.pas System.Win.ScktComp.hpp |
System.Win.ScktComp | TClientSocket |
Description
Occurs when a client socket should read information from the socket connection.
System.Win.ScktComp.TClientSocket.OnRead inherits from System.Win.ScktComp.TCustomSocket.OnRead. All content below this line refers to System.Win.ScktComp.TCustomSocket.OnRead.
Occurs when a client socket should read information from the socket connection.
Write an OnRead event handler to read from the socket connection. If the socket is a blocking socket, use a TWinSocketStream object to read from the connection. Otherwise, use the methods of the Socket parameter to perform the actual reading.
Note: Non-blocking sockets do not always receive an OnRead event for the last bit of data passed over the connection. When using a non-blocking socket, check for any unread data in the OnDisconnect event to make sure that everything is handled.