private void AddTunnel(Tunnel tunnel) { lock ( RunningTunnels ) { RunningTunnels.Add(tunnel); } }
void RemovePoolTunnel(Tunnel tunnel) { if (tunnel is OutboundTunnel) { lock ( OutboundEstablishedPool ) { again: var match = OutboundEstablishedPool.IndexOf((OutboundTunnel)tunnel); if (match != -1) { OutboundEstablishedPool.RemoveAt(match); goto again; } } } if (tunnel is InboundTunnel) { lock ( InboundEstablishedPool ) { again: var match = InboundEstablishedPool.IndexOf((InboundTunnel)tunnel); if (match != -1) { InboundEstablishedPool.RemoveAt(match); goto again; } } RemoveTunnelFromLeaseSet((InboundTunnel)tunnel); } }
void RemovePendingTunnel(Tunnel tunnel) { if (tunnel is OutboundTunnel) { lock ( OutboundPending ) { var match = OutboundPending.IndexOf((OutboundTunnel)tunnel); if (match != -1) { OutboundPending.RemoveAt(match); } } } if (tunnel is InboundTunnel) { lock ( InboundPending ) { var match = InboundPending.IndexOf((InboundTunnel)tunnel); if (match != -1) { InboundPending.RemoveAt(match); } } } }
private void RemoveTunnel(Tunnel tunnel) { lock ( RunningTunnels ) { again: var match = RunningTunnels.IndexOf(tunnel); if (match != -1) { RunningTunnels.RemoveAt(match); goto again; } } }
internal void TunnelEstablished(Tunnel tunnel) { RemovePendingTunnel(tunnel); if (tunnel is OutboundTunnel) { lock (OutboundEstablishedPool) OutboundEstablishedPool.Add((OutboundTunnel)tunnel); } if (tunnel is InboundTunnel) { var it = (InboundTunnel)tunnel; lock (InboundEstablishedPool) InboundEstablishedPool.Add(it); it.GarlicMessageReceived += new Action <I2PCore.Tunnel.I2NP.Messages.GarlicMessage>(InboundTunnel_GarlicMessageReceived); AddTunnelToLeaseSet(it); } }
internal TestRun2(Tunnel testtunnel) { TunnelUnderTest = testtunnel; }
internal TunnelTestResult(Tunnel tunnel) { TestedTunnel = tunnel; }
internal void TunnelTimeout(Tunnel tunnel) { }
internal void TunnelBuildTimeout(Tunnel tunnel) { }
internal void TunnelEstablished(Tunnel tunnel) { }
internal void TunnelTimeout(Tunnel tunnel) { Logging.LogDebug("PassthroughProvider: TunnelTimeout: " + tunnel.ToString()); RemoveTunnel(tunnel); }
internal void TunnelBuildTimeout(Tunnel tunnel) { // Never called, I think }
internal void TunnelEstablished(Tunnel tunnel) { // Never called, I think }
internal void RemoveTunnel(Tunnel tunnel) { RemovePendingTunnel(tunnel); RemovePoolTunnel(tunnel); }