UDP Inetd Server : Inetd : Network PYTHON TUTORIALS


PYTHON TUTORIALS » Network » Inetd »

 

UDP Inetd Server


import socket, time, sys

s = socket.fromfd(sys.stdin.fileno(), socket.AF_INET, socket.SOCK_DGRAM)
message, address = s.recvfrom(8192)
s.connect(address)
for i in range(10):
    s.send("Reply %d: %s" (i + 1, message))
    time.sleep(2)
s.send("OK, I'm done sending replies.n")



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Network
» Inetd