17 lines
424 B
Python
17 lines
424 B
Python
import socket
|
|
|
|
SERVER_PORT = 41234
|
|
SERVER_SEND_PORT = 41235
|
|
|
|
sock_recv = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
sock_recv.bind(("0.0.0.0", SERVER_PORT))
|
|
sock_send = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
sock_send.bind(("0.0.0.0", SERVER_SEND_PORT))
|
|
|
|
print("Running...")
|
|
|
|
while True:
|
|
data, addr = sock_recv.recvfrom(1024)
|
|
print(f"Recieved test from addr {addr}")
|
|
sock_send.sendto(data, addr)
|