Open
Description
When using grpc C++, creating a channel immediately creates a connection to the server. I can monitor the ConnectionState and make sure I have a valid connection to the server.
However, when using dart, I could not find a way to force the channel to connect.
GrpcClient() : channel = createChannel() {
stub = ultraproto.TelemetryServiceClient(channel);
// this is never triggered!
channel.onConnectionStateChanged
.listen((event) => onConnectionStateChanged(event));
It seems that unless I am explicitly call to one of the stub RPC methods, the channel onConnectionStateChanged
event is never triggered.
Questions:
- Is this a bug?
- Is this behavior documented somewhere?
- is there a way to force the channel to connect?