def checkstartserver(self): addr = ('localhost', 0) responder = reflectipc.ReflectResponder(testipc.PROTOCOL, TestImpl()) self.server = ipc.SocketServer(responder, addr) sock = socket.socket() sock.connect(self.server.getaddress()) client = ipc.SocketTransceiver(sock) self.proxy = reflectipc.getclient(testipc.PROTOCOL, client)
def _interopclient(): for file in os.listdir(_SERVER_PORTS_DIR): port = open(_SERVER_PORTS_DIR+file).read() print "Validating python client to", file, "-", port sock = socket.socket() sock.connect(("localhost", int(port))) client = ipc.SocketTransceiver(sock) testproto = testipcreflect.TestProtocol("testipc") testproto.proxy = reflectipc.getclient(testipc.PROTOCOL, client) testproto.checkhello() testproto.checkecho() testproto.checkechobytes() testproto.checkerror() print "Done! Validation python client to", file, "-", port
def _interopclient(): for file in os.listdir(_SERVER_PORTS_DIR): port = open(_SERVER_PORTS_DIR + file).read() print "Validating python client to", file, "-", port sock = socket.socket() sock.connect(("localhost", int(port))) client = ipc.SocketTransceiver(sock) testproto = testipcreflect.TestProtocol("testipc") testproto.proxy = reflectipc.getclient(testipc.PROTOCOL, client) testproto.checkhello() testproto.checkecho() testproto.checkechobytes() testproto.checkerror() print "Done! Validation python client to", file, "-", port