Bidirectional Communication between two devices using Websockets

375 Views Asked by At

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

1

There are 1 best solutions below

0
On BEST ANSWER

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.