protected override void OnStart() { base.OnStart(); m_Engine = new SFEngine(); m_Engine.StartEngine(); m_MessageRouter.RegisterMessageHandler(SF.Net.MessageIDLogin.CreateRandomUserRes, 0, HandleLoginRes); m_MessageRouter.RegisterMessageHandler(SF.Net.MessageIDLogin.UpdateMyScoreRes, 0, HandleScoreRes); }
protected override void OnStop() { CloseAllConnections(); if (m_Engine != null) { m_Engine.StopEngine(); } m_Engine = null; base.OnStop(); }