internal void RemoveConnect(ConnectBase connect) { lock (ClientSocketListLock) { ConnectList.Remove(connect); } }
internal void AddConnect(ConnectBase connect) { lock (ClientSocketListLock) { ConnectList.Add(connect); } }
public void SendData(string connectID, byte[] data) { ConnectBase socketSession = GetConnect(connectID); if (socketSession == null) { throw new Exception("未找到链接" + connectID); } socketSession.SendData(data); }
public void SendMessage(string connectID, IMessage message) { ConnectBase socketSession = GetConnect(connectID); if (socketSession == null) { throw new Exception("未找到链接" + connectID); } socketSession.SendMessage(message); }