User Tools

Site Tools


admin:udpserver

UDP Receiver

Simple program to check if UDP packets are received at user layer

import socket

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(("0.0.0.0", 5111))

while True:
    data, addr = sock.recvfrom(3000) 
    print "received packet :", len(data)
admin/udpserver.txt · Last modified: 2019/07/09 16:13 by veera