public SocketRequestHandlerContext(ITcpConnection connection, Action<byte[]> sendReplyAction)
 {
     Channel = new SocketChannel(connection);
     SendRemotingResponse = remotingResponse =>
     {
         sendReplyAction(RemotingUtil.BuildResponseMessage(remotingResponse));
     };
 }
Esempio n. 2
0
 public SocketRequestHandlerContext(ITcpConnection connection, Action <byte[]> sendReplyAction)
 {
     Channel = new SocketChannel(connection);
     SendRemotingResponse = remotingResponse =>
     {
         sendReplyAction(RemotingUtil.BuildResponseMessage(remotingResponse));
     };
 }
 public SocketRequestHandlerContext(ReceiveContext receiveContext)
 {
     Channel = new SocketChannel(receiveContext.ReplySocketInfo);
     SendRemotingResponse = remotingResponse =>
     {
         receiveContext.ReplyMessage = RemotingUtil.BuildResponseMessage(remotingResponse);
         receiveContext.MessageHandledCallback(receiveContext);
     };
 }