How to broadcast in gRPC from server to client?

前端 未结 3 769
野的像风
野的像风 2021-01-06 03:26

I\'m creating a small chat application in gRPC right now and I\'ve run into the issue where if a user wants to connect to the gRPC server as a client, I\'d like to broadcast

3条回答
  •  醉话见心
    2021-01-06 03:46

    Yup, I don't see any other way than keeping a global data structure containing all the connected streams and looping through them, telling each about the even that just occurred.

提交回复
热议问题