def __init__(self): self.host = 'localhost' self.server_port = 50051 self.channel = grpc.insecure_channel('{}:{}'.format( self.host, self.server_port)) self.stub = pb2_grpc.UnaryStub(self.channel)
def __init__(self): self.host = '1.2.4.120' self.server_port = 6443 # instantiate a channel self.channel = grpc.insecure_channel('{}:{}'.format( self.host, self.server_port)) # bind the client and the server self.stub = pb2_grpc.UnaryStub(self.channel)
def __init__(self): print('__UnaryClient/__init_____') self.host = 'localhost' self.server_port = 50051 # instantiate a channel self.channel = grpc.insecure_channel('{}:{}'.format( self.host, self.server_port)) # bind the client and the server self.stub = pb2_grpc.UnaryStub(self.channel)