public ClientManager(int loopMills) { this.Clients = new ConcurrentDictionary <Client, byte>(); this.ClientsChecker = new InfiniteLoop(loopMills, new OnTickCallback(CheckSessions)); this.ServerListener = CreateSocketListener(); }
public BroadcastEmitter() { UdpAddress = new IPEndPoint(IPAddress.Broadcast, DotNetEnv.Env.GetInt("UDP_LISTENER_PORT")); UdpClient = new UdpClient(); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { UdpClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1); } UdpClient.EnableBroadcast = true; BroadcastLoop = new InfiniteLoop(LOOP_MILLS, new OnTickCallback(SendBroadcastMessage)); }
private InfiniteLoop ParseInfiniteLoop() { var body = ParseLoopBody(false); if (body == null) { return(null); } var node = new InfiniteLoop(); node.AddChild(body); return(node); }
public void Stop() { try { BroadcastLoop.Stop(); BroadcastLoop = null; UdpClient.Close(); UdpClient.Dispose(); UdpClient = null; UdpAddress = null; } catch (Exception e) { Logger.WriteLine("Exception->BroadcastEmiter::Stop " + e.ToString(), Logger.LOG_LEVEL.ERROR); } }
public void initInventory() { inventorySkills = new baseSkill[14]; inventorySkills [0] = new Arrays (); inventorySkills [1] = new BreakAndContinue (); inventorySkills [2] = new DDOS (); inventorySkills [3] = new DefaultFunctions (); inventorySkills [4] = new FireWall (); inventorySkills [5] = new FunctionsWithInputOutput (); inventorySkills [6] = new FunctionsWithOutput (); inventorySkills [7] = new Hash (); inventorySkills [8] = new IfElse (); inventorySkills [9] = new InfiniteLoop (); inventorySkills [10] = new Loop (); inventorySkills [11] = new PacketSniffing (); inventorySkills [12] = new Recursion (); inventorySkills [13] = new Stack (); Debug.Log ("Finished Loading Inventory"); }
public void Initialize() { gameColsole = new GameConsole(); infiniteLoop = new InfiniteLoop(); }
public static void Initialize() { ConnectedUsers = new ConcurrentDictionary <string, LocalUser>(); Looper = new InfiniteLoop(LOOP_MILLS, new OnTickCallback(CheckConnectedUsers)); }