def __init__(self, host='0.0.0.0', port=8080):
     self.host = host
     self.port = port
     self.channel = grpc.insecure_channel('%s:%d' % (host, port))
     self.stub = inner_data_pb2_grpc.CommunicationServiceStub(self.channel)
Example #2
0
 def __init__(self, host, port, sender):
     assert sender is not None, 'sender has to be specified'
     self.channel = grpc.insecure_channel('%s:%d' % (host, port))
     self.stub = inner_data_pb2_grpc.CommunicationServiceStub(self.channel)
     self.sender = sender
     self.receiver = host