Beispiel #1
0
 public static void UnRegist(int id)
 {
     if (_dic.ContainsKey((int)id))
     {
         _dic.Remove((int)id);
         return;
     }
     AnyLogger.E("do not have key:" + id);
 }
Beispiel #2
0
        private static void SendBytes(int id, byte[] bytes = null)
        {
            SendPackage sendPackage = bytes == null ? new SendPackage((int)id) : new SendPackage((int)id, bytes);

            if (TcpConnection.Instance == null)
            {
                AnyLogger.E("should init socket first");
                return;
            }
            TcpConnection.Instance.Send(sendPackage);
        }