Untitled
user_7384651
plain_text
a year ago
335 B
5
Indexable
import socket MAXLINE = 1024 serv_sd = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) serv_sd.bind(('localhost', 5678)) while True: print("Server: waiting for client") data, cli_addr = serv_sd.recvfrom(MAXLINE) print("Recv:", data.decode()) # Display received string from the client serv_sd.close()
Editor is loading...
Leave a Comment