I’m making two programs; a “server” application (single instance), and a client application (multiple instances), that connects to the server app. There will be continuous (but light) data sent between the server app and the client apps, but no communication between the client applications.
So far I’m successfully testing this with open socket connections between computers on my local network. So that means I’m using the IP-addresses found in cmd > ipconfig. The server app uses TcpListener / TcpClient. I don’t really know if that’s the best connection to use, or if there are others (?), but that’s all I have learned.
What is now required to make this work over internet? I assume I will send connection request to the external IP address, but do I need to make any more sophisticated changes to the requests?
And do I need to make some settings in the router? If so, what type?
Any hints would be appreciated, as you see, I’m not much familiar with this.
You can continue to use sockets. To make communication to the server easier, use a host name instead of an IP address; that way, the server is free to change IP addresses without the clients needing to be re-deployed.
Another issue to consider is firewalls. You’ll need to make sure that the host for the server application allows inbound connections to the TCP port it’s listening on, and also that any router that it’s behind also allows inbound traffic to that port. Also, clients may have connectivity issues if they have firewalls blocking outbound traffic.