feat: add TCP and UDP client-server scripts

This commit is contained in:
stud203996 committed 2026-11-30 15:12:02 +03:00
1 parent a56496622d
commit 48b3cca2c4
4 files changed
+56

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
import socket
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
client.sendto(b'hello udp server', ('127.0.0.1', 10500))
data, _ = client.recvfrom(1024)
print(f"Ответ от сервера: {data.decode('utf-8')}")
client.close()