diff options
Diffstat (limited to 'extmod/uasyncio/stream.py')
-rw-r--r-- | extmod/uasyncio/stream.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extmod/uasyncio/stream.py b/extmod/uasyncio/stream.py index 875353c940..ac297cce04 100644 --- a/extmod/uasyncio/stream.py +++ b/extmod/uasyncio/stream.py @@ -101,8 +101,8 @@ StreamWriter = Stream # # async def open_connection(host, port): - from uerrno import EINPROGRESS - import usocket as socket + from errno import EINPROGRESS + import socket ai = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[0] # TODO this is blocking! s = socket.socket(ai[0], ai[1], ai[2]) @@ -154,7 +154,7 @@ class Server: # Helper function to start a TCP stream server, running as a new task # TODO could use an accept-callback on socket read activity instead of creating a task async def start_server(cb, host, port, backlog=5): - import usocket as socket + import socket # Create and bind server socket. host = socket.getaddrinfo(host, port)[0] # TODO this is blocking! |