from SocketServer import TCPServer, StreamRequestHandlerclass Handler(StreamRequestHandler): def handle(self): addr = self.request.getpeername() print 'Got connection from', addr self.wfile.write('Thank you for connecting')server = TCPServer(('', 1234), Handler)server.serve_forever()
Name (required)
email (will not be published) (required)
Website