Easiest for two way communication over the internet using C #

What do I use for two-way communication over the Internet without having to open ports on the client side?

Users will not agree to open ports and do port forwarding on the client side, although anything is possible on the server side.

But I need to perform two way communication.

How can I achieve this?

It doesn't matter if its WCF or remote access or web services ... I just need a quick and fast way to get the concept to develop and distribute the application.

Of course, it will be via the Internet.

Please help .. Thanks

Edit: Please note that I need to connect multiple clients and maintain a session for each client.

+2


source to share


3 answers


WCF supports duplex HTTP bindings.



As long as the initiating client can access the service, a callback contract can be defined to invoke the client. It just maintains an HTTP connection after the client has initiated it.

+3


source


It depends on what you want to do. Duplex WCF can work, but through NAT and Proxies it becomes somewhat "iffy" because it depends on the client opening the WCF endpoint and maintaining the connection.



I wrote a beginner's guide to WCF callbacks a while ago - simple enough to do, but you'll need to test it a lot, from different client settings.

+2


source


Connect over TCP (raw sockets or higher implementation) to a central server.
You must have an application on your server that is listening on a specific, known TCP port.
Each client connects to your server using a specific port and "logs in".
Write down the application protocol above TCP (authentication, session management, etc.) and there you have it , since a TCP connection, once established, works both ways .

+1


source







All Articles