protected NuclearServer(int port, int tickrate) : this(new IPEndPoint(IPAddress.Any, port)) { PacketManager = new PacketManager(Workloads, GetPeer, OnException); PingManager = new PingManager(GetPeer, CreatePeer, OnException); TickManager = new TickManager(tickrate, CleanPeers); TickManager.AddToTick(HandlePackets); TickManager.AddToTick(OnTick); EventSender = new EventSender(_client); BeginListen(); SetMaxThreads(); }
internal void SetEventSender(EventSender Sender) { DataSender = Sender; }