/// <summary> /// 关闭网络 /// </summary> /// <param name="bClearAll">是否清空数据</param> /// <returns>关闭状态</returns> public bool ShutDown(bool bClearAll = true) { bool bDisconnectok = true; bool bClearAllok = true; if (m_gameSock != null) { m_gameSock.Disconnect(); if (bClearAll && m_gameClient != null) { bClearAllok = m_gameClient.ClearAll(); } } return(bDisconnectok && bClearAllok); }