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"); } }
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"); } }
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); }
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"); } }
public RpcHttpServerTransaction(RpcHttpServerChannel channel, HttpListenerContext ctx) : base(channel, null, ParseRequest(ctx)) { _httpContext = ctx; }