Beispiel #1
0
 // 函数区域
 public NetworkMgr()
 {
     m_visitMutex   = new MMutex(false, "NetMutex");
     m_id2ClientDic = new Dictionary <string, NetTCPClient>();
     #if NET_MULTHREAD
     startThread();
     #endif
 }
Beispiel #2
0
 // 函数区域
 public NetworkMgr()
 {
     m_visitMutex = new MMutex(false, "NetMutex");
     m_id2ClientDic = new Dictionary<string, NetTCPClient>();
     #if NET_MULTHREAD
     startThread();
     #endif
 }
Beispiel #3
0
        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();
        }
Beispiel #4
0
        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();
        }
Beispiel #5
0
 public MLock(MMutex mutex)
 {
     m_mmutex = mutex;
     m_mmutex.WaitOne();
 }
Beispiel #6
0
 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);
 }