|
-
July 10th, 2012, 11:13 PM
#1
Originate TCP messages from either end?
Hi
I need a half-duplex TCP/IP channel, to carry info in either direction but only in one direction at a time. I can't predict which end will originate the message that starts a session, so whenever the channel's not in use each end must be listening continuously for the other.
Using, say, .NET remoting I've done this with a listener - a server - that also exposes an event, so either end can originate a message to the other: the server by raising an "I have a message for the client" event, to which the client responds; or the client by calling an "I have a message for the server" method on the server.
In this case I don't have the luxury of .NET remoting and must use TCP/IP sockets. Is there really no option but to put both a server and a client at each end, with each server listening on a different port? I can't see any other way to allow either end to originate a session.
TIA.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|