private IDisposable MakeDemux(TunnelDemultiplexer config) { TcpDemultiplexer demux = new TcpDemultiplexer( MakeListener(config.IpEndpoint, config.Port, config) ); foreach (TunnelSenderFromPort target in config.Targets) { demux.Add(target.OriginalPort, MakeSender(target)); } demux.SetLogDirectory(config.MonitoringDirectory); return(demux.Start()); }
public void Add(TunnelDemultiplexer service) { AddListener(service); }