<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 4, 2013 at 8:45 AM, 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"><div id=":2jp">Take a look at TBlockSocket.InternalCanRead and TBlockSocket.CanRead in<br>
synapse on how to set up select correctly. Then do something like<br>
<br>
repeat<br>
  if Socket.CanRead(timeout) then<br>
    begin<br>
    insock:=Socket.Accept;<br>
    if insock<>-1 then<br>
      //start working with insock<br>
    else<br>
      //deal with error<br>
    end;<br>
until ThreadTerminated;</div></blockquote></div><br><div class="gmail_default" style="font-family:tahoma,sans-serif">​I have put Select before Accept and it doesn't work, it blocked forever​ without accepting any connection.<br>
Accept function who block the thread and get new connection.<br></div><div dir="ltr"><span style="font-family:courier new,monospace"><br>Best Regards<br>Zaher Dirkey</span></div>
</div></div>