feat(dscp): implemented multiple dscps per user

This commit is contained in:
Sebastian Rust
2025-01-29 14:48:37 +01:00
parent 6740a37ac8
commit f7c97470fa
2 changed files with 18 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ import socket
import argparse
import time
import sys
from loguru import logger
def main():
# Parse command-line arguments
@@ -20,10 +21,13 @@ def main():
sock.settimeout(args.timeout)
try:
count = 0
while True:
try:
# Wait for a UDP packet
data, addr = sock.recvfrom(1024) # Buffer size is 1024 bytes
count += 1
logger.debug(f"Received packet {count} from {addr}")
except socket.timeout:
print(f"No packets received for {args.timeout} seconds. Shutting down.")
break