| View previous topic :: View next topic |
| Author |
Message |
Bo Berglund Guest
|
Posted: Fri May 04, 2007 8:11 am Post subject: LKimiting number of clients in TIdTCPServer? |
|
|
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
|
Posted: Fri May 04, 2007 8:11 am Post subject: Re: LKimiting number of clients in TIdTCPServer? |
|
|
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
|
Posted: Fri May 04, 2007 8:11 am Post subject: Re: LKimiting number of clients in TIdTCPServer? |
|
|
"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
|
Posted: Fri May 04, 2007 8:11 am Post subject: Re: LKimiting number of clients in TIdTCPServer? |
|
|
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 |
|
 |
|