public override XDR Write(XDR xdr) { xdr.WriteInt(xid); xdr.WriteInt(messageType.GetValue()); xdr.WriteInt(replyState.GetValue()); Verifier.WriteFlavorAndVerifier(verifier, xdr); xdr.WriteInt(rejectState.GetValue()); return(xdr); }
private void SendAcceptedReply(RpcCall call, EndPoint remoteAddress, RpcAcceptedReply.AcceptState acceptState, ChannelHandlerContext ctx) { RpcAcceptedReply reply = RpcAcceptedReply.GetInstance(call.GetXid(), acceptState, Verifier.VerifierNone); XDR @out = new XDR(); reply.Write(@out); if (acceptState == RpcAcceptedReply.AcceptState.ProgMismatch) { @out.WriteInt(lowProgVersion); @out.WriteInt(highProgVersion); } ChannelBuffer b = ChannelBuffers.WrappedBuffer(@out.AsReadOnlyWrap().Buffer()); RpcResponse rsp = new RpcResponse(b, remoteAddress); RpcUtil.SendRpcResponse(ctx, rsp); }
private void SerializeInt(int times) { XDR w = new XDR(); for (int i = 0; i < times; ++i) { w.WriteInt(WriteValue); } XDR r = w.AsReadOnlyWrap(); for (int i_1 = 0; i_1 < times; ++i_1) { Assert.Equal(WriteValue, r.ReadInt()); } }
public override XDR Write(XDR xdr) { xdr.WriteInt(xid); xdr.WriteInt(RpcMessage.Type.RpcCall.GetValue()); xdr.WriteInt(2); xdr.WriteInt(program); xdr.WriteInt(version); xdr.WriteInt(procedure); Credentials.WriteFlavorAndCredentials(credentials, xdr); Verifier.WriteFlavorAndVerifier(verifier, xdr); return(xdr); }