Home | Trees | Indices | Help |
---|
|
1 from operationscore.Input import * 2 import socket4 """UDPInput is a barebones UDP Input class. It takes any data it receives and adds it to the 5 'data' element of the response dict. It also notes the 'address'. Specify: 6 <Port> -- the Port to listen on.""" 7179 HOST = '' # Symbolic name meaning all available interfaces 10 PORT = self.argDict['Port'] # Arbitrary non-privileged port 11 self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 12 self.sock.bind((HOST, PORT))14 (data,address) = self.sock.recvfrom(1024) 15 dataDict = {'data':data, 'address':address} 16 self.respond(dataDict)
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Feb 18 16:55:26 2011 | http://epydoc.sourceforge.net |