You have to be careful with SetLinger if you are using Windows (Winsock). Winsock only supports linger values in seconds - not milliseconds. As I recall Synapse divides this value by 1000 when you are using Winsock. So 10/1000 = 0 (integer math) so SetLinger(True, 10) really is treated as SetLinger(False, 0) and it aborts the connection and thows away any queued outbound data. It's common to say SetLinger(True, 1000) when you are on Windows.
Jon B -----Original Message----- From: [EMAIL PROTECTED] on behalf of Lukas Gebauer Sent: Sat 12/30/2006 3:39 AM To: Ararat Synapse Cc: Subject: Re: [Synalist] Output truncated > > > To solve the problem just insert this line > > > > > > Sock.SetLinger(True, 10000); > > > > Is not 10000 seconds too much? > > > >From your documatation: > > Sets linger. Enabled linger means that the system waits another LINGER (in > milliseconds) time for delivery of sent data. This function is only for > stream type of socket! (TCP) > > So it waits a maximum of 10 seconds. In the worst case the tcp/ip stack > contains 64 kB of data when the SendBuffer procedure returns. So 10 > seconds are quite low on an ISDN connection. Ah, error in my mind! Very prehistoric Synapse have this value in seconds, and I forgot it! It is really in milliseconds now. See my demo (prehistrc too), and you can found here line where I setting Linger to value 10. It is really small value. Try to raise this value to yours 10000 and see if it helps you. (I was setting linger on listening socket, because accepted sockets should got socket settings from listening socket. You can verify, it is this true. :-)) -- Lukas Gebauer. E-mail: [EMAIL PROTECTED] WEB: http://www.ararat.cz/synapse - Synapse Delphi and Kylix TCP/IP Library ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
<<winmail.dat>>
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
