Dynamic binding, peer management and local network discovery for WebSockets