feat(dscp): implemented multiple dscps per user
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user