Socket-based inetd server : Inetd : Network PYTHON TUTORIALS


PYTHON TUTORIALS » Network » Inetd »

 

Socket-based inetd server


import sys, socket, time
s = socket.fromfd(sys.stdin.fileno(), socket.AF_INET, socket.SOCK_STREAM)
s.sendall("Welcome.n")
s.sendall("connected from %s.n" % str(s.getpeername()))
s.sendall("The local time is %s.n" % time.asctime())



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Network
» Inetd