def __init__(self): self.channel = grpc.insecure_channel('localhost:3000') self.stub = ping_pb2_grpc.PingPongStub(self.channel)
def __init__(self, port, host='0.0.0.0'): #print(port) self.channel = grpc.insecure_channel('%s:%d' % (host, int(port))) self.stub = ping_pb2_grpc.PingPongStub(self.channel) self.clientid = 0
def __init__(self, host='0.0.0.0', port=3000): self.channel = grpc.insecure_channel('%s:%d' % (host, port)) self.stub = ping_pb2_grpc.PingPongStub(self.channel)
def __init__(self, host='0.0.0.0', port=3000): self.channel = grpc.insecure_channel('%s:%d' % (host,port)) self.stub = ping_pb2_grpc.PingPongStub(self.channel) resp = self.stub.register(Request(id=-1)) self.id = resp.id