Re: [twsocket] Proper DataAvailable handling

2010-01-28 Thread Anton Sviridov
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

Re: [twsocket] FTP Server example

2010-01-28 Thread Francois PIETTE
I've been looking at the FTPServ1 sample app and I don't quite understand the worker thread part of the Getprocessing routine . Why is the data sent in the OnTerminate event rather than the execute method ? The idea is to have the FTP server trigger some lengthy processing (here a simple 10 s

Re: [twsocket] Proper DataAvailable handling

2010-01-28 Thread Francois PIETTE
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

[twsocket] SSO Authetication for MSNMessenger service

2010-01-28 Thread Ger van Steenderen
For an application I want to be able to login to MSN Messenger Service with MSNP18 protocol with requires SSO authentication. I found some examples in VB and C# and tried to translate them to Delphi (2010). With some testvalues I found on the internet I didn't get the result I should have uni

Re: [twsocket] Proper DataAvailable handling

2010-01-28 Thread Anton Sviridov
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

[twsocket] Proper DataAvailable handling

2010-01-28 Thread Anton Sviridov
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