123456789101112131415 |
- import socket
- SERVER = "10.8.0.5"
- PORT = 7777
- client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- client.connect((SERVER, PORT))
- client.sendall(bytes("Черный треугольник жив!", "UTF-8"))
- while True:
- in_data = client.recv(4096)
- print("От сервера:" ,in_data.decode())
|