public MultiplexedTcpConnection(TcpClient tcpClient, QueueBufferedStream multiplexedOutputStream) : base(tcpClient.GetStream().Write) { this.tcpClient = tcpClient; this.outputPump = new MultiplexConnectionOutputPump(tcpClient.GetStream().Read, multiplexedOutputStream.Write, Id); this.outputPump.BeginRunPump(PumpComplete, null); }
public MultiplexedPipeConnection(NamedPipeServerStream pipeServer, Microsoft.Samples.ServiceBus.Connections.QueueBufferedStream multiplexedOutputStream) : base(pipeServer.Write) { this.pipeServer = pipeServer; this.outputPump = new MultiplexConnectionOutputPump(pipeServer.Read, multiplexedOutputStream.Write, Id); this.outputPump.BeginRunPump(PumpComplete, null); }
public MultiplexedTcpConnection(TcpClient tcpClient, QueueBufferedStream multiplexedOutputStream) : base(tcpClient.GetStream().Write) { this.tcpClient = tcpClient; this.outputPump = new MultiplexConnectionOutputPump(tcpClient.GetStream().Read, multiplexedOutputStream.Write, Id); this.outputPump.BeginRunPump(PumpComplete, null); }
public MultiplexedPipeConnection(NamedPipeServerStream pipeServer, Microsoft.Samples.ServiceBus.Connections.QueueBufferedStream multiplexedOutputStream) : base(pipeServer.Write) { this.pipeServer = pipeServer; this.outputPump = new MultiplexConnectionOutputPump(pipeServer.Read, multiplexedOutputStream.Write, Id); this.outputPump.BeginRunPump(PumpComplete, null); }
public MultiplexedServiceTcpConnection(StreamConnection streamConnection, TcpClient tcpClient, int connectionId) : base(tcpClient.GetStream().Write, connectionId) { this.streamConnection = streamConnection; this.tcpClient = tcpClient; this.outputPump = new MultiplexConnectionOutputPump(tcpClient.GetStream().Read, streamConnection.Stream.Write, connectionId); this.outputPump.BeginRunPump(PumpCompleted, null); }
public MultiplexedServiceNamedPipeConnection(StreamConnection streamConnection, NamedPipeClientStream pipeClient, int connectionId) : base(pipeClient.Write, connectionId) { this.streamConnection = streamConnection; this.pipeClient = pipeClient; this.outputPump = new MultiplexConnectionOutputPump(pipeClient.Read, streamConnection.Stream.Write, connectionId); this.outputPump.BeginRunPump(PumpCompleted, null); }
public MultiplexedServiceNamedPipeConnection(StreamConnection streamConnection, NamedPipeClientStream pipeClient, int connectionId) : base(pipeClient.Write, connectionId) { this.streamConnection = streamConnection; this.pipeClient = pipeClient; this.outputPump = new MultiplexConnectionOutputPump(pipeClient.Read, streamConnection.Stream.Write, connectionId); this.outputPump.BeginRunPump(PumpCompleted, null); }
public MultiplexedServiceTcpConnection(StreamConnection streamConnection, TcpClient tcpClient, int connectionId) : base(tcpClient.GetStream().Write, connectionId) { this.streamConnection = streamConnection; this.tcpClient = tcpClient; this.outputPump = new MultiplexConnectionOutputPump(tcpClient.GetStream().Read, streamConnection.Stream.Write, connectionId); this.outputPump.BeginRunPump(PumpCompleted, null); }
void PumpCompleted(IAsyncResult asyncResult) { try { MultiplexConnectionOutputPump.EndRunPump(asyncResult); } catch (Exception ex) { Trace.TraceError("Error in pump: {0}", ex.Message); } Dispose(); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (this.pipeServer != null) { this.pipeServer.Close(); this.pipeServer = null; } if (this.outputPump != null) { this.outputPump.Dispose(); this.outputPump = null; } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (this.tcpClient != null) { this.tcpClient.Close(); this.tcpClient = null; } if (this.outputPump != null) { this.outputPump.Dispose(); this.outputPump = null; } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (this.tcpClient != null) { this.tcpClient.Close(); this.tcpClient = null; } if (this.outputPump != null) { this.outputPump.Dispose(); this.outputPump = null; } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (this.pipeServer != null) { this.pipeServer.Close(); this.pipeServer = null; } if (this.outputPump != null) { this.outputPump.Dispose(); this.outputPump = null; } }
void PumpComplete(IAsyncResult a) { try { MultiplexConnectionOutputPump.EndRunPump(a); } catch (Exception ex) { Trace.TraceError("Failure in multiplex pump: {0}", ex.Message); } if (this.Closed != null) { Closed(this, new EventArgs()); } this.Dispose(); }