/// <summary> /// 停止服务 /// </summary> public static void StopServer() { try { foreach (var session in AllConnectionKey) { _server.CloseSession(session.Value.SessionKey); } _server.Shutdown(); } catch (Exception ex) { LogUtils.Error($"{ex}"); } }
public void CloseSession(string sessionKey) { _server.CloseSession(sessionKey); }