public SocketRequestHandlerContext(ITcpConnection connection, Action <byte[]> sendReplyAction) { Connection = connection; SendRemotingResponse = remotingResponse => { sendReplyAction(RemotingUtil.BuildResponseMessage(remotingResponse)); }; }
private static byte[] BuildRemotingServerMessage(RemotingResponse remotingResponse) { byte[] remotingResponseData = RemotingUtil.BuildResponseMessage(remotingResponse); var remotingServerMessage = new RemotingServerMessage( RemotingServerMessageType.RemotingResponse, 100, remotingResponseData, null); return(RemotingUtil.BuildRemotingServerMessage(remotingServerMessage)); }