Skip to content

Create socket in YowNetworkLayer with socket.create_connection#2423

Open
chomechome wants to merge 1 commit intotgalal:masterfrom
chomechome:master
Open

Create socket in YowNetworkLayer with socket.create_connection#2423
chomechome wants to merge 1 commit intotgalal:masterfrom
chomechome:master

Conversation

@chomechome
Copy link
Copy Markdown

Came across a problem with yowsup in an IPv6 network. Currently, AF_INET socket is always created during connection to WhatsApp endpoints, and it fails to connect to non-IPv4 addresses. However, socket module has a convenience function create_connection that creates and connects a socket to a given address. It handles detection of address family and socket type itself, thus creating a suitable socket both in IPv4 and IPv6 environments.

@wronglink
Copy link
Copy Markdown

Following this PR as I have troubles with IPv6-only environment. The current workaround solves it.

@tgalal tgalal added this to the Next milestone May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants