14 lines
249 B
Python
14 lines
249 B
Python
#!/usr/bin/env python3
|
|
|
|
import socket
|
|
|
|
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
|
|
server.bind(("0.0.0.0", 54248))
|
|
server.listen(32)
|
|
|
|
client, addr = server.accept()
|
|
with client:
|
|
print(client.recv(24))
|
|
client.sendall(b"pong")
|