|Subject:||Re: TCP Server|
|Posted by:||Remy Lebeau \(Indy Team\) (email@example.com)|
|Date:||Wed, 19 Aug 2009|
"Alan T" <alan_NO_SPAM_plt…@yahoo.com.au> wrote in message
> Just wonder how the TCPServer differentiate different connections from
Each client runs in its own thread, and has its own TIdPeerThread (Indy 9
and earlier) or TIdContext (Indy 10) object associated wih it.
> When the server is listening to the port, eg. 9000, multi-client are
> requesting file and how the server can send different file to
> different clients?
You are supposed to do all of your work in the context of the thread that
manages the client connection, such as in the server's OnExecute event.
Then you don't need to differentiate, since everything is local to each
Remy Lebeau (Indy Team)
TCP Server posted by Alan T on Wed, 19 Aug 2009