// 函数区域 public NetworkMgr() { m_visitMutex = new MMutex(false, "NetMutex"); m_id2ClientDic = new Dictionary <string, NetTCPClient>(); #if NET_MULTHREAD startThread(); #endif }
// 函数区域 public NetworkMgr() { m_visitMutex = new MMutex(false, "NetMutex"); m_id2ClientDic = new Dictionary<string, NetTCPClient>(); #if NET_MULTHREAD startThread(); #endif }
protected MMutex m_sendMutex; // 读互斥 #endif public NetTCPClient(string ip = "localhost", int port = 5000) { m_brecvThreadStart = false; m_isConnected = false; m_msgSendEndEvent = new MEvent(false); m_sendMutex = new MMutex(false, "NetTCPClient_SendMutex"); m_ip = ip; m_port = port; m_clientBuffer = new ClientBuffer(); }
public MLock(MMutex mutex) { m_mmutex = mutex; m_mmutex.WaitOne(); }
public LockList(string name, uint initCapacity = 32 /*DataCV.INIT_ELEM_CAPACITY*/, uint maxCapacity = 8 * 1024 * 1024 /*DataCV.MAX_CAPACITY*/) { m_dynamicBuffer = new DynBuffer <T>(initCapacity, maxCapacity); m_visitMutex = new MMutex(false, name); }