Pithikos / python-websocket-server

A simple fully working websocket-server in Python with no external dependencies
MIT License
1.13k stars 380 forks source link

support IPV6 connection ? #106

Open tomitomas opened 1 year ago

tomitomas commented 1 year ago

Hi,

first of all, thanks for this great lib !

Quick question :

WebsocketServer(host="0.0.0.0", port=12345)

will that allow a connection using IPV6 ?

if not, is there a specific config to allow it ?

AlexandreVig commented 1 year ago

Hi,

you need to modify the variable address_family of the TCPServer Class in the socketserver.py file of your python lib like this:

address_family = socket.AF_INET6