public CI2C_RunPara() { for (int i = 0; i < 20; i++) { Cmd.Add(new CI2C_Cmd()); } }
// Cache_Init public static void Init(int capacity) { _Capacity = capacity; _BytesAllocated = 0; _Head = new CacheEntry(true); Cmd.Add("flush", Flush); }
/// <summary> /// CDAudio_Init /// </summary> public static bool Init() { if (Client.Cls.state == ClientActivityState.Dedicated) { return(false); } if (Common.HasParam("-nocdaudio")) { return(false); } _Controller.Init(); if (_Controller.IsInitialized) { Cmd.Add("cd", CD_f); Con.Print("CD Audio Initialized\n"); } return(_Controller.IsInitialized); }
private static void AddPeer(HostPort newpeer) { lock (peers) { if (!peers.Contains(newpeer)) { peers.Add(newpeer); ThreadPool.QueueUserWorkItem(o => { lock (peers) { foreach (var peer in peers) { Cmd cmd = new Cmd(port, Cmd.ADDPEER); cmd.Add("peer", newpeer); SendCommand(peer, cmd); } } }); } } }