Exemple #1
0
            /// <exception cref="System.Exception"/>
            public override void MessageReceived(ChannelHandlerContext ctx, MessageEvent e)
            {
                ChannelBuffer buf  = (ChannelBuffer)e.GetMessage();
                ByteBuffer    b    = buf.ToByteBuffer().AsReadOnlyBuffer();
                XDR           @in  = new XDR(b, XDR.State.Reading);
                RpcInfo       info = null;

                try
                {
                    RpcCall       callHeader = RpcCall.Read(@in);
                    ChannelBuffer dataBuffer = ChannelBuffers.WrappedBuffer(@in.Buffer().Slice());
                    info = new RpcInfo(callHeader, dataBuffer, ctx, e.GetChannel(), e.GetRemoteAddress
                                           ());
                }
                catch (Exception)
                {
                    Log.Info("Malformed RPC request from " + e.GetRemoteAddress());
                }
                if (info != null)
                {
                    Channels.FireMessageReceived(ctx, info);
                }
            }
Exemple #2
0
 protected internal override bool IsIdempotent(RpcCall call)
 {
     return(false);
 }
Exemple #3
0
 internal static void CreatePortmapXDRheader(XDR xdr_out, int procedure)
 {
     // Make this a method
     RpcCall.GetInstance(0, 100000, 2, procedure, new CredentialsNone(), new VerifierNone
                             ()).Write(xdr_out);
 }
Exemple #4
0
 protected internal abstract bool IsIdempotent(RpcCall call);