/// <summary> /// Returns a paired <see cref="LaggedLocalNetworkConnection"/> that represents the other endpoint. /// </summary> public LaggedLocalNetworkConnection GetPairedNetworkConnection() { if (this.pairedNetworkConnection == null) { this.pairedNetworkConnection = new LaggedLocalNetworkConnection(this); } return(this.pairedNetworkConnection); }
/// <summary> /// Constructor for creating a linked pair of network connections. /// </summary> private LaggedLocalNetworkConnection(LaggedLocalNetworkConnection pairedNetworkConnection) : this(pairedNetworkConnection.MaxMessageSize, pairedNetworkConnection.SimulatedLatency) { this.pairedNetworkConnection = pairedNetworkConnection; this.stopwatch = pairedNetworkConnection.stopwatch; }