clientConnect function

Future<void> clientConnect()

Implementation

Future<void> clientConnect()
async {

  final channel = ClientChannel(
    '127.0.0.1',
    port: 5000,
    options: const ChannelOptions(credentials: ChannelCredentials.insecure()),
  );

  final stub = AlbumServiceClient(channel);
  print("connection is done...");
// unary style responses
  var response = await stub.getAlbums(AlbumRequest());
  print('Response received: ${response.writeToJson()}');
}