private void ProcessClientThread(NamedPipeServerStream pipeStream) { try { if (this.RequestReieved != null) //has event subscribers { var args = new PipeClientConnectionEventArgs(pipeStream); RequestReieved(this, args); } } catch (Exception e) { _log.Error("ProcessClientThread error: {0}", e.ToString().Flatten()); } finally { if (pipeStream.IsConnected) { pipeStream.Close(); } pipeStream.Dispose(); } }
/// <summary> /// This method handles all requests on separate thread per client connection. /// There is one thread running this method for each connected client. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void ClientConnectionMade(object sender, PipeClientConnectionEventArgs args) { var stream = new BufferedStream(args.PipeStream); base.ProcessRequest(stream); }
private void ProcessClientThread(NamedPipeServerStream pipeStream) { try { if (this.RequestReieved != null) //has event subscribers { var args = new PipeClientConnectionEventArgs(pipeStream); RequestReieved(this, args); } } catch (Exception e) { _log.Error("ProcessClientThread error: {0}", e.ToString().Flatten()); } finally { if (pipeStream.IsConnected) pipeStream.Close(); pipeStream.Dispose(); } }