RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TClientSocket.OnRead Event

Occurs when a client socket should read information from the socket connection.

Pascal
property OnRead: TSocketNotifyEvent;
C++
__property TSocketNotifyEvent OnRead;

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, u 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.
 

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