add files

This commit is contained in:
2026-02-04 17:11:31 +03:00
parent 2b7b154440
commit 823855e737
4 changed files with 88 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import socket
server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
server.bind(('0.0.0.0', 10001))
print("UDP сервер запущен")
while True:
data, addr = server.recvfrom(1024)
print(f"Сообщение от {addr}: {data.decode()}")
server.sendto(data.upper(), addr)