Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Feb : Re: Dual TIdTCPClient / TIdTCPServer Connection
| Subject: | Re: Dual TIdTCPClient / TIdTCPServer Connection |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Tue, 19 Feb 2008 10:47:23 |
"Dennis Christensen" <dkc@GateHouse.dk> wrote in message
news:47ba9a09@newsgroups.borland.com...
> I have two applications running on two diffeent PC's and I am
> using two pairs of TIdTCPClient / TIdTCPServer to send messages
> between them. One pair is always used in direction A->B, and the
> other pair is alway used in the opposite direction B->A.
Why are you doing that? Besides not being very friendly to firewalls and
routers, TCP is bi-directional anyway so you only need 1 pair for two-way
communication.
> Is this the best way to implements this two way communication?
No.
> I am asking because the communication sometimes deadlocks.
Then you are not managing it correctly, or at least are not taking Indy's
blocking architecture into account correctly.
Gambit