Skip to content

Instantly share code, notes, and snippets.

@bettdouglas
Last active February 11, 2021 22:18
Show Gist options
  • Save bettdouglas/e887c34eb0765b30990b61bffce51028 to your computer and use it in GitHub Desktop.
Save bettdouglas/e887c34eb0765b30990b61bffce51028 to your computer and use it in GitHub Desktop.
Connection constants to point to our server
final options = ChannelOptions(
credentials: ChannelCredentials.insecure(), // we're not using TLS
connectionTimeout: Duration(milliseconds: 500),
idleTimeout: Duration(
milliseconds: 500,
),
);
final clientChannel = ClientChannel(
'0.0.0.0', // host the server is running on
port: 12345, // port the server is running on
options: options,
);
final hospitalStub = HospitalServerClient(clientChannel); // Handles making calls to the API on the specified clientChannel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment