コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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;
 }