Open italodeverdade opened 4 weeks ago
Couple of notes.
First, the async client would need to be changed to support the same functionality, and ideally with the same change in the constructor arguments.
Second, I'm thinking there is another possible way to handle this, which would involve calling getaddrinfo(host, port, type=socket.SOCK_STREAM)
and letting the system decide itself between IPv4 and IPv6. The address_family
would only be needed in case you want to force one type or the other. The getaddrinfo function returns the arguments to pass to the socket constructor and the connect call. WDYT?
Hey @miguelgrinberg, first sorry to take longer to work on your feedback. Work has been crazy these days 🥲
So, I have checked the async client but it seems it uses different implementation without the need to pass address_family there so i assume that the async client handles it automatically? I made the changes but to be honest in a moment it feels wrong so let me know if you really need it there :)
I fixed also a typo on extra_headers
parameters.
Hey, first of all thanks for the amazing project! :)
I'm implementing a python project using
simple-websocket
on Railway and realized thatsimple-websocket
don't support IPv6 yet. So i took the time to change theAF_INET
toAF_INET6
. Following the documentation specifics about the differences between both it should enough to use justAF_INET6
for now :)I could be wrong here, but prefer to open the PR here so we can may add support in future? Thanks!