public byte[] EncodeClientRequest(RpcRequest request) { var builder = new BytesBuilder(_serializer); builder.AppendLong(request.RequestId); builder.Append(request.Path); builder.Append(request.Body); return(builder.Build()); }
public byte[] EncodeServerResponse(RpcResponse response) { var builder = new BytesBuilder(_serializer); builder.AppendLong(response.RequestId); builder.AppendInt(response.StatuCode); builder.Append(response.Body); return(builder.Build()); }