mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-19 21:32:34 +03:00
fa03894a53
git-svn-id: svn://kolibrios.org@2110 a494cfbc-eb01-0410-851d-a64ba20cac60
15 lines
285 B
Python
15 lines
285 B
Python
import socket
|
|
|
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
s.bind(('192.168.1.101', 5000))
|
|
s.listen(1)
|
|
conn, addr = s.accept()
|
|
print("Connected by ", addr)
|
|
while True:
|
|
data = conn.recv(1024)
|
|
if not data:
|
|
break
|
|
print(data)
|
|
conn.send(data)
|
|
conn.close()
|