BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LKimiting number of clients in TIdTCPServer?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Bo Berglund
Guest





PostPosted: Fri May 04, 2007 8:11 am    Post subject: LKimiting number of clients in TIdTCPServer? Reply with quote



Is there a way to limit the number of connections to a TCP server
using Indy9 and Delphi7?

The "server" I need to build (see other threads) is really a client
for all reasonable purposes and I would like to limit the number of
connections to exactly one. How can this be done?

If I stop listening when a connection has been done, will the
connection that has been established remain or will it be lost?

/Bo
Back to top
Joe Aley
Guest





PostPosted: Fri May 04, 2007 8:11 am    Post subject: Re: LKimiting number of clients in TIdTCPServer? Reply with quote



Bo Berglund wrote:

Quote:
Is there a way to limit the number of connections to a TCP server
using Indy9 and Delphi7?

The "server" I need to build (see other threads) is really a client
for all reasonable purposes and I would like to limit the number of
connections to exactly one. How can this be done?

If I stop listening when a connection has been done, will the
connection that has been established remain or will it be lost?

/Bo


TIdHttpServer has a property "MaxConnections" on the object inspector.
Set it to one or:

IdHTTPServer1.MaxConnections := 1
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri May 04, 2007 8:11 am    Post subject: Re: LKimiting number of clients in TIdTCPServer? Reply with quote



"Bo Berglund" <bo.berglund (AT) telia (DOT) com> wrote in message
news:emhl33h8qdn4mnsbo3eevn01gg7d7hi0il (AT) 4ax (DOT) com...

Quote:
Is there a way to limit the number of connections to a TCP server
using Indy9 and Delphi7?

TIdTCPServer has a MaxConnections property for exactly that purpose.

Quote:
The "server" I need to build (see other threads) is really a client
for all reasonable purposes and I would like to limit the number
of connections to exactly one. How can this be done?

Perhaps consider using a TIdSimpleServer instead. It is designed for
1-to-1 connections like that.

Quote:
If I stop listening when a connection has been done, will the
connection that has been established remain or will it be lost?

Depends on how you stop the listening.


Gambit
Back to top
Bo Berglund
Guest





PostPosted: Fri May 04, 2007 8:11 am    Post subject: Re: LKimiting number of clients in TIdTCPServer? Reply with quote

On Fri, 04 May 2007 07:41:29 +0200, Bo Berglund
<bo.berglund (AT) telia (DOT) com> wrote:

Quote:
Is there a way to limit the number of connections to a TCP server
using Indy9 and Delphi7?

The "server" I need to build (see other threads) is really a client
for all reasonable purposes and I would like to limit the number of
connections to exactly one. How can this be done?

If I stop listening when a connection has been done, will the
connection that has been established remain or will it be lost?


Found it:
TIdTCPServer.MaxConnections.

sorry for the noise.

/Bo
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.