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

Était-ce utile?

La 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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top