Question

Can i achieve a real bidirectional communication between a (c++) device in the local network behind a NAT and a device (PC) in the internet (not behind a NAT) using websockets. The begin of communication should be triggered by the network device.

kind regards

Was it helpful?

Solution

WebSockets will behave exactly like any other sockets in this regard. If the initiator is behind a NAT device and the recipient is not then it should work (subject to any special policy of the NAT device). If the target is behind a NAT it will not work without some sort of port forwarding setup.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top