コード例 #1
0
ファイル: RpcDeniedReply.cs プロジェクト: orf53975/hadoop.net
 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);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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());
            }
        }
コード例 #4
0
ファイル: RpcCall.cs プロジェクト: orf53975/hadoop.net
 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);
 }