WebSocketServer: How to listen on ipv6 port.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By adequateBritan

I want to use a WebSocketServer with ipv6 to avoid some NAT issues. Everything works dandy when using ipv4, but clients given the ipv6 address and appropriate port of the server machine don’t get any response.

From my admittedly limited understanding of Websockets, it seems that in other use cases, one would need to separately tell the server to listen on an ipv6 port since the ports for the two systems are separate.

WebSocketServer.listen doesn’t seem to have any arguments for this. the argument “protocols” has very little documentation behind it, but it seems to refer to websocket “subprotocols” which aren’t related to ip version.

did you find anything?

avnih | 2021-05-07 12:21