Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Re: idTcpServer or idCmdTcpServer - D7 indy10.1.5
| Subject: | Re: idTcpServer or idCmdTcpServer - D7 indy10.1.5 |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Tue, 18 Apr 2006 15:49:43 |
"Jacques Noah" <jacques.noah@btinternet.com> wrote in message
news:444564c6@newsgroups.borland.com...
> Well the clients have to sent their status to the server, for example
> when a user has reached the end of their allowed internet access
> time, the client would send a message back to the server telling it
> that it is 'free'.
Or, the client could simply disconnect without telling the server at all,
and the server can automatically "free" any dropped connections.
> That is the only communication between the server and the client
> apart from the onConnect event.
Based on your description above, if you do what I suggest, there you would
have no more need for the client to send commands to the server. Code-wide,
you can then use TIdTCPServer on the server-side, and TIdCmdTCPClient on the
client-side. As for status updates, you could have the server periodically
poll the active clients via a command that they respond to. That would also
act as a kind of keep-alive so the both the client and server can detect
lost connections.
Gambit