Пример #1
0
 private static void ProcessRequest(RpcHttpServerChannel channel, HttpListenerContext httpContext)
 {
     try {
         RpcHttpServerTransaction tx = new RpcHttpServerTransaction(channel, httpContext);
         channel.OnTransactionCreated(tx);
     } catch (Exception ex) {
         SystemLog.Error(LogEventID.RpcFailed, ex, "RpcServiceStartFailed");
     }
 }
Пример #2
0
 public static void ProcessRequest(RpcHttpServerChannel channel, HttpListenerContext httpContext)
 {
     try {
         RpcHttpServerTransaction trans = new RpcHttpServerTransaction(httpContext);
         channel.TransactionStart(trans);
     } catch (Exception ex) {
         SystemLog.Error(LogEventID.RpcFailed, ex, "RpcServiceStartFailed");
     }
 }
Пример #3
0
 public static void ProcessRequest(RpcHttpServerChannel channel, HttpListenerContext httpContext)
 {
     try {
         RpcHttpServerTransaction trans = new RpcHttpServerTransaction(httpContext);
         channel.TransactionStart(trans);
     } catch (Exception ex) {
         SystemLog.Error(LogEventID.RpcFailed, ex, "RpcServiceStartFailed");
     }
 }
Пример #4
0
        public static void ListenerCallback(IAsyncResult result)
        {
            // Console.WriteLine("Receive Callback");
            RpcHttpServerChannel channel = (RpcHttpServerChannel)result.AsyncState;

            //
            // Call EndGetContext to complete the asynchronous operation.
            HttpListenerContext context = channel._listener.EndGetContext(result);

            channel._listener.BeginGetContext(new AsyncCallback(ListenerCallback), channel);
            ProcessRequest(channel, context);
        }
Пример #5
0
        private static void ListenerCallback(IAsyncResult result)
        {
            try {
                RpcHttpServerChannel channel = (RpcHttpServerChannel)result.AsyncState;

                // Call EndGetContext to complete the asynchronous operation.
                HttpListenerContext context = channel._listener.EndGetContext(result);
                channel._listener.BeginGetContext(new AsyncCallback(ListenerCallback), channel);
                ProcessRequest(channel, context);
            } catch (Exception ex) {
                SystemLog.Error(LogEventID.RpcFailed, ex, "RpcHttpChannel.ListenerCallback Failed");
            }
        }
Пример #6
0
 public RpcHttpServerTransaction(RpcHttpServerChannel channel, HttpListenerContext ctx)
     : base(channel, null, ParseRequest(ctx))
 {
     _httpContext = ctx;
 }