You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
On the esp8266 you need to call socket.getaddrinfo() to get the IP
address you want to bind/connect with. Then the result of this call
is fed into bind/connect. In that case, bind/connect don't call
getaddrinfo but rather just take a raw IP address and port (as an
integer) and use that. This is also compatible with CPython. But as
a convenience CPython also allows you to pass a domain name instead of
an IP address to bind/connect, and in that case it'll do a getaddrinfo
for you. You can look at extmod/modlwip.c to see how it's done there
(eg it uses netutils_parse_inet_addr). But it should be that at least
I can use the following 2 ways to connect (or bind):
s=socket.socket()
s.connect(('176.58.119.26', 80)) # specify IP address and port directly