client.py 327 B

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