<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 4, 2013 at 9:42 PM, Ludo Brands <span dir="ltr"><<a href="mailto:ludo.brands@free.fr" target="_blank">ludo.brands@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
However, in your code you do<br>
if (c = 0) or (c = SOCKET_ERROR) then<br>
begin<br>
Error;<br>
<br>
which is not correct. c=0 is the result of select returning after a<br>
timeout. It is not an error.<br>
The fact that<br>
<div class="im"> if Socket.Select(10000, slRead) = erNone then<br>
</div>is blocked forever is not normal. It should at least return after 10<br>
seconds.<br>
</blockquote></div><br><div class="gmail_default" style="font-family:tahoma,sans-serif">I am not testing in linux it is broked with me and i have not good internet to fix it.<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
now in this example<br><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms737526%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/ms737526%28v=vs.85%29.aspx</a><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
They not use Select before accept<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">and in <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx</a><br>
<br>>The parameter <em>readfds</em> identifies the sockets that are to be checked for readability. If the socket is currently in the
<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms739168%28v=vs.85%29.aspx"><strong>listen</strong></a> state, it will be marked as readable if >an incoming connection request has been received such that an
<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms737526%28v=vs.85%29.aspx"><strong>accept</strong></a> is guaranteed to complete <b>without blocking</b>.<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
I still not sure in windows need Select, but maybe in Linux only, but i can't test it there.<br></div><br><br clear="all"><br>-- <br><div dir="ltr"><span style="font-family:courier new,monospace">I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3<br>
<br>Best Regards<br>Zaher Dirkey</span></div>
</div></div>