We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 456fc8a commit 93399f6Copy full SHA for 93399f6
examples/wiznet5k_simpleserver.py
@@ -28,11 +28,10 @@
28
server.bind((server_ip, server_port)) # Bind to IP and Port
29
server.listen() # Begin listening for incoming clients
30
31
+conn, addr = server.accept() # Wait for a connection from a client.
32
while True:
- conn, addr = server.accept() # Wait for a connection from a client.
33
with conn:
34
- while True:
35
- data = conn.recv()
36
- if data: # Wait for receiving data
37
- print(data)
38
- conn.send(data) # Echo message back to client
+ data = conn.recv(1024)
+ if data: # Wait for receiving data
+ print(data)
+ conn.send(data) # Echo message back to client
0 commit comments