コード例 #1
0
 // 函数区域
 public NetworkMgr()
 {
     m_visitMutex   = new MMutex(false, "NetMutex");
     m_id2ClientDic = new Dictionary <string, NetTCPClient>();
     #if NET_MULTHREAD
     startThread();
     #endif
 }
コード例 #2
0
ファイル: NetworkMgr.cs プロジェクト: zhutaorun/unitygame
 // 函数区域
 public NetworkMgr()
 {
     m_visitMutex = new MMutex(false, "NetMutex");
     m_id2ClientDic = new Dictionary<string, NetTCPClient>();
     #if NET_MULTHREAD
     startThread();
     #endif
 }
コード例 #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();
        }
コード例 #4
0
ファイル: NetTCPClient.cs プロジェクト: zhutaorun/unitygame
        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();
        }
コード例 #5
0
 public MLock(MMutex mutex)
 {
     m_mmutex = mutex;
     m_mmutex.WaitOne();
 }
コード例 #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);
 }