The heartbeat connection for unity.

58 views
Skip to first unread message

Ripple

unread,
Nov 2, 2021, 5:06:05 AM11/2/21
to grpc.io
Hi,
  Grpc for unity is being used in our project. I have a question:
The bottom layer of grpc has implemented heartbeat connection, but it does not provide C# api access. I must define a message "Alive" to implement this function. But I think it is repeated.
 I would appreciate it if you could give me some guidance.

Thanks,
Ripple

Jan Tattermusch

unread,
Nov 19, 2021, 8:48:22 AM11/19/21
to grpc.io
If you are referring to the keepalive functionality (see https://github.com/grpc/grpc/blob/master/doc/keepalive.md), it can be configured for C# even without being explicitly exposed in the API.
What you need to do it to set the channel arguments (= ChannelOptions in the C# API) according to the documentation, e.g. new ChannelOption("the_string_name", value)
You can pass the channel options when creating a channel ("new Channel(target, channelOptions)" and when creating a server "new Server(channelOptions)".
Reply all
Reply to author
Forward
0 new messages