grpc / grpc-dart

The Dart language implementation of gRPC.
https://pub.dev/packages/grpc
Apache License 2.0
860 stars 271 forks source link

Example of grpc dart server and client with secure connection #500

Closed guyluz11 closed 3 years ago

guyluz11 commented 3 years ago

I couldn't find any example of grpc server and client with secure connection.

Can somebody post here example?.

I have tried it myself but when I adding the secure part I am getting error

Caught error: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: HandshakeException: Connection terminated during handshake, details: null, rawResponse: null)

You can see the code in my stack overflow post.

Also it is important to note that in my case the server and the client is written in dart console application (dart native) on Linux and not flutter.

grpc: ^3.0.0
protobuf: ^2.0.0
mraleph commented 3 years ago

You can look at the test, which tests this functionality:

https://github.com/grpc/grpc-dart/blob/master/test/round_trip_test.dart#L104-L126

guyluz11 commented 3 years ago

Many thanks.