Grpc go: how to know on the server side when the client closes the connection

I am using grpc go

i has rpc, which looks something like this:

196 service MyService {
197   // Operation 1
198   rpc Operation1(OperationRequest) returns (OperationResponse) {
199       option (google.api.http) = {
200         post: "/apiver/myser/oper1"
201         body: "*"
202     };
203   }

The client connects using the grpc.Dial () method

When a client connects, the server runs some workbook. when the client disconnects, the account must be deleted.

is there any callback that can be logged that can be used to know that the client has closed the session.

+4
source share

Source: https://habr.com/ru/post/1656550/


All Articles