public override async Task <GetMemberReply> GetClusterMembers(GetMemberRequest request, ServerCallContext context) { var response = new GetMemberReply(); await Task.Run(() => { response.Members.Add("YO SOY IL BEST"); }); return(response); }
private async Task WriteUpdateAsync(IServerStreamWriter <GetMemberReply> stream, List <string> members) { try { var response = new GetMemberReply(); response.Members.AddRange(members); await stream.WriteAsync(response); } catch (Exception e) { _logger.LogError($"Failed to write message: {e.Message}"); } }
private async Task WriteUpdateAsync(IServerStreamWriter <ServerResponse> stream, List <string> members) { var reply = new GetMemberReply(); reply.Members.AddRange(members); try { await stream.WriteAsync(new ServerResponse { Msg2 = reply }); } catch (Exception e) { _logger.LogError($"Failed to write message: {e.Message}"); } }