This commit is contained in:
2023-03-25 09:56:21 +01:00
parent cd77bbd38f
commit 21a4552986
7 changed files with 293 additions and 1 deletions

17
tcp_server_python/client.py Executable file
View File

@@ -0,0 +1,17 @@
#! /usr/bin/env python3
import socket
target_host = "127.0.0.1"
target_port = 9998
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((target_host, target_port))
client.sendto(b'print("Hello")', (target_host, target_port))
response = client.recv(4096)
print(response.decode())
client.close()