public ServersManager(ServersManagerConfig config) { if (BufferManager.IsInitialized() == false) { BufferManager.Initialize(256); // Mb } if (EventArgsManager.IsInitialized() == false) { EventArgsManager.Initialize(); } this.running = false; this.sync = new object(); this.protocolPorts = new List <ProtocolPort>(); this.servers = new ThreadSafeDictionary <ServerEndPoint, Server <C> >(); this.fakeServers = new ThreadSafeDictionary <ServerEndPoint, Server <C> >(); this.AddressPredicate = DefaultAddressPredicate; this.FakeAddressAction = DefaultFakeAddressAction; this.config = config; this.nextPort = config.MinPort; this.logger = new Logger(); }
public ServersManager(ServersManagerConfig config) { if (!BufferManager.IsInitialized()) { BufferManager.Initialize(256); } if (!EventArgsManager.IsInitialized()) { EventArgsManager.Initialize(); } this.running = false; this.sync = new object(); this.protocolPorts = new List <ProtocolPort>(); this.servers = new ThreadSafeDictionary <ServerEndPoint, Server <C> >(); this.fakeServers = new ThreadSafeDictionary <ServerEndPoint, Server <C> >(); this.AddressPredicate = new Func <NetworkInterface, IPInterfaceProperties, UnicastIPAddressInformation, bool>(ServersManager <C> .DefaultAddressPredicate); this.FakeAddressAction = new Func <ServerEndPoint, IPEndPoint>(ServersManager <C> .DefaultFakeAddressAction); this.config = config; this.nextPort = config.MinPort; this.logger = new Logger(); }