[fpc-pascal] How to close TInetServer without except?

Zaher Dirkey parmaja at gmail.com
Sat May 4 16:31:48 CEST 2013


On Sat, May 4, 2013 at 8:45 AM, Ludo Brands <ludo.brands at free.fr> wrote:

> Take a look at TBlockSocket.InternalCanRead and TBlockSocket.CanRead in
> synapse on how to set up select correctly. Then do something like
>
> repeat
>   if Socket.CanRead(timeout) then
>     begin
>     insock:=Socket.Accept;
>     if insock<>-1 then
>       //start working with insock
>     else
>       //deal with error
>     end;
> until ThreadTerminated;
>

‚ÄčI have put Select before Accept and it doesn't work, it blocked forever‚Äč
without accepting any connection.
Accept function who block the thread and get new connection.

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130504/35d97ef3/attachment.html>


More information about the fpc-pascal mailing list