update examples/socket/server_client.py.

Signed-off-by: 李昂 <liang6516@outlook.com>
This commit is contained in:
李昂 2022-08-28 06:54:13 +00:00 committed by Gitee
parent 6eec732fb5
commit 78aba92e01
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -17,13 +17,13 @@ res = server.accept()
accept = res[0]
addr = res[1]
print("recv from client %s" % str(addr))
print("recv from client: %s" % str(addr))
client.send(String("send test from client").encode())
print("server recv", ByteArray(accept.recv(1024)).decode())
print("server recv:", ByteArray(accept.recv(1024)).decode())
accept.send(String("send test from server").encode())
print("client recv", ByteArray(client.recv(1024)).decode())
print("client recv:", ByteArray(client.recv(1024)).decode())
accept.close()
client.close()