示例#1
0
        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());
        }
示例#2
0
        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());
        }