Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tcp_rvice_syslog-ng.py
import os
import sys
import SocketServer
import threading
class ThreadedEchoRequestHandler(SocketServer.StreamRequestHandler):
def handle(self):
self.data = self.rfile.readline().strip()
print self.data
return
class ThreadedEchoServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
pass
if __name__ == "__main__":
host,port="0.0.0.0",5144
HOST,PORT = host,port
server = ThreadedEchoServer((host,port), ThreadedEchoRequestHandler)
#server = SocketServer.TCPServer((HOST, PORT), ThreadedEchoRequestHandler)
server.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.