Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Sep : Re: Indy10 TCPServer - refusing connections

www.cryer.info
Managed Newsgroup Archive

Re: Indy10 TCPServer - refusing connections

Subject:Re: Indy10 TCPServer - refusing connections
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Tue, 18 Sep 2007 10:53:36

"Toby Piper" <news@CompCraft.com> wrote in message
news:46efc50e$1@newsgroups.borland.com...

> I want to idle the TCP server while ensuring that any
> current operations complete.

TIdTCPServer is not designed for that.  When you set its Active property to
false, it closes all of the active connections immediately, causing the
appropriate exceptions to be raised in your event handlers the next time you
access the sockets so that the threads can terminate themselves accordingly.

> So I'd like to be able to refuse new connections.

The closest you can get to that with TIdTCPServer right now is to set the
MaxConnections property to 1.  The server will still be able to accept new
connections, but will close them right away without starting any threads for
them.

> If I just set the TCPServer.Active property to false will that do it?

That will do a full shutdown.


Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive