Thank you, Francois, wonderful answer, things are getting completely clear!
--
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
I found that Receive returns -1 with WSAEWOULDBLOCK error when
DoDataAvailable is called with RcvdCount = 0.
WSAEWOULDBLOCK should safely be ignored.
So, the first question is: is it necessary to call method when no data
available in fact,
Yes, it. There is somewhere a note from Microsoft sa
Forgot to mention: the 2nd and 3rd snippets are for different purposes and are
members of different classes.
--
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte
What is the proper way to handle TWSocket.DataAvailable?
I found this way in demo:
function TBinaryWSocket.TriggerDataAvailable(ErrCode: Word): Boolean;
var
Rcvd: Integer;
begin
Result := TRUE;
Rcvd := Receive(@FRcvBuf[FWriteOffs], (SizeOf(FRcvBuf) - FWriteOffs));
if Rcvd > 0 then