[fpc-pascal] SSocket: TSocketServer.StopAccepting

Johann Glaser Johann.Glaser at gmx.at
Sat Sep 6 13:50:14 CEST 2008


Hi!

> I am using Synapse for all my socket work, so this might be a bit 
> different for you. But for a blocking listener in a thread (waiting at 
> an Accept), I call AbortSocket. It immediately stops all work on the 
> socket and lets you do the things you need to do. I'm sure there's a 
> similar "Abort" function in the package you are using.

Thanks for the hint. I looked at Synapse but it was too much of an
overkill for me. I managed to get ssockets working by setting
MaxConnections to 1, doing a dummy-connect to abort listening (which
still has a problem if the listening didn't start) and a little patch to
ssockets (http://mantis.freepascal.org/view.php?id=12040).

Bye
  Hansi





More information about the fpc-pascal mailing list