Exemple #1
0
 public void InitClient()
 {
     m_client               = new AsycUdpClient();
     m_client.OnConnect    += OnConnect;
     m_client.OnDisconnect += OnDisconnect;
     m_client.OnMessage    += OnMessage;
 }
Exemple #2
0
 /// <summary>
 /// 初始化网络客户端
 /// </summary>
 public void InitClient()
 {
     client               = new AsycUdpClient();
     client.OnConnect    += OnConnect;
     client.OnDisconnect += OnDisconnect;
     client.OnMessage    += OnMessage;
     isInitialized        = true;
 }
        private void Ping()
        {
            long ping = AsycUdpClient.Ping(new IPEndPoint(IPAddress.Parse(_ip), 1337));

            Debug.Log("Ping....." + ping);
        }