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

Ludo Brands ludo.brands at free.fr
Fri May 3 08:19:53 CEST 2013


On 05/02/2013 10:00 PM, silvioprog wrote:
> 
> Lines 277 and 278. That is, I already do that. The problem now is how to
> stop the "Accept" but without errors.
> 
> I implemented the "Stop" method in socket, but I did not want to do it
> this ugly way.
> 

Same solution as for recv and send. Or use blocking mode with a select
before accept, or use non blocking mode and deal with EAGAIN or
EWOULDBLOCK. Here you seem to use blocking mode and accept will only
return with a new connection or an error.

Ludo



More information about the fpc-pascal mailing list