summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/network.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/library/network.rst')
-rw-r--r--docs/library/network.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/library/network.rst b/docs/library/network.rst
index a20eb2ebf5..c188bb3135 100644
--- a/docs/library/network.rst
+++ b/docs/library/network.rst
@@ -9,7 +9,7 @@ This module provides network drivers and routing configuration. To use this
module, a MicroPython variant/build with network capabilities must be installed.
Network drivers for specific hardware are available within this module and are
used to configure hardware network interface(s). Network services provided
-by configured interfaces are then available for use via the :mod:`usocket`
+by configured interfaces are then available for use via the :mod:`socket`
module.
For example::
@@ -17,17 +17,17 @@ For example::
# connect/ show IP config a specific network interface
# see below for examples of specific drivers
import network
- import utime
+ import time
nic = network.Driver(...)
if not nic.isconnected():
nic.connect()
print("Waiting for connection...")
while not nic.isconnected():
- utime.sleep(1)
+ time.sleep(1)
print(nic.ifconfig())
- # now use usocket as usual
- import usocket as socket
+ # now use socket as usual
+ import socket as socket
addr = socket.getaddrinfo('micropython.org', 80)[0][-1]
s = socket.socket()
s.connect(addr)