Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Apr : passing info from a tcp server event to another event

www.cryer.info
Managed Newsgroup Archive

passing info from a tcp server event to another event

Subject:passing info from a tcp server event to another event
Posted by:"Moore" (moo..@hotmail.com)
Date:18 Apr 2008 04:25:28

I have an application where there is a TIdCmdTCPClient connecting and receiving commands from an external server (QNix server) and a TIdCMDTCPServer which forwards commands from his clients (nothing to do with the ext server) to this TIdCmdTCPClient to send them to the external server,

In the TIdCMDTCPServer BeforeCommandHandler I write to the IOHandler of the TIdCmdTCPClient, this in turn in his BeforeCommandHandler must write to one of the TIdCMDTCPServer's clients (contexts), the one who requested to the TIdCMDTCPServer.

What i want is to pass the TIdCMDTCPServer's context to the TIdCmdTCPClient for this latter when receiving the response from the external server, write to that context's connection and not to another as various may be waiting for response.

I hope i am clear, how to pass a param from one component's event to another's without using global variables..thnx

Replies:

www.cryer.info
Managed Newsgroup Archive