Example #1
0
        private void OnConnectClose(long conn_idx)
        {
            Log.Info("Close session:" + conn_idx);

            ConnAppProc app_server = null;

            if (m_app_servers.TryGetValue(conn_idx, out app_server))
            {
                //广播消息
                inner.AppServerRemove msg = PacketPools.Get(inner.msg.APPSERVER_REMOVE) as inner.AppServerRemove;
                msg.srv_uid = app_server.srv_info.srv_uid;
                this.BroadcastMsgWithout(msg, app_server.conn_idx);

                OnConnAppLeave(app_server);
            }
            m_app_servers.Remove(conn_idx);
        }
Example #2
0
 /// <summary>
 /// 移除服务器
 /// </summary>
 public void HandleAppServerRemove(PacketBase packet)
 {
     inner.AppServerRemove re_msg = packet as inner.AppServerRemove;
     Log.Info("收到服务器关闭 sid:" + re_msg.srv_uid);
 }