internal static void CreateTunnel(Session oSession) { if (oSession == null || oSession.oRequest == null || oSession.oRequest.headers == null || oSession.oRequest.pipeClient == null || oSession.oResponse == null) { return; } ClientPipe pipeClient = oSession.oRequest.pipeClient; if (pipeClient == null) { return; } oSession.oRequest.pipeClient = null; ServerPipe pipeServer = oSession.oResponse.pipeServer; if (pipeServer == null) { return; } oSession.oResponse.pipeServer = null; CONNECTTunnel cONNECTTunnel = new CONNECTTunnel(oSession, pipeClient, pipeServer); oSession.__oTunnel = cONNECTTunnel; new Thread(new ThreadStart(cONNECTTunnel.RunTunnel)) { IsBackground = true }.Start(); }
internal static void CreateTunnel(Session oSession) { if (((oSession != null) && (oSession.oRequest != null)) && (((oSession.oRequest.headers != null) && (oSession.oRequest.pipeClient != null)) && (oSession.oResponse != null))) { ClientPipe pipeClient = oSession.oRequest.pipeClient; if (pipeClient != null) { oSession.oRequest.pipeClient = null; ServerPipe pipeServer = oSession.oResponse.pipeServer; if (pipeServer != null) { oSession.oResponse.pipeServer = null; CONNECTTunnel tunnel = new CONNECTTunnel(oSession, pipeClient, pipeServer); oSession.__oTunnel = tunnel; new Thread(new ThreadStart(tunnel.RunTunnel)) { IsBackground = true }.Start(); } } } }