Exemple #1
0
 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)
Exemple #2
0
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
Exemple #3
0
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