protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
        {
            if (log.IsDebugEnabled)
            {
                log.DebugFormat("Disconnect: pid={0}: reason={1}, detail={2}", this.ConnectionId, reasonCode, reasonDetail);
            }

            this.lobby.RemovePeer(this);
        }
        protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
        {
            if (log.IsInfoEnabled)
            {
                string serverId = this.ServerId.HasValue ? this.ServerId.ToString() : "{null}";
                log.InfoFormat("OnDisconnect: game server connection closed (connectionId={0}, serverId={1}, reason={2})", this.ConnectionId, serverId, reasonCode);
            }

            this.RemoveGameServerPeerOnMaster();
        }
        protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
        {
            base.OnDisconnect(reasonCode, reasonDetail);

            if (this.application.AppStatsPublisher != null)
            {
                this.application.AppStatsPublisher.DecrementPeerCount();
            }
        }
Beispiel #4
0
 protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
 {
     log.DebugFormat("LobbyPeer Disconnected. Reason: {0}, {1}", reasonCode, reasonDetail);
 }
        protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
        {
            if (log.IsDebugEnabled)
            {
                log.DebugFormat("OnDisconnect: conId={0}, reason={1}, detail={2}", this.ConnectionId, reasonCode, reasonDetail);
            }

            if (GameApplication.Instance.AppStatsPublisher != null)
            {
                GameApplication.Instance.AppStatsPublisher.DecrementPeerCount();
            }

            if (this.RoomReference == null)
            {
                return;
            }

            var message = new RoomMessage((byte)GameMessageCodes.RemovePeerFromGame, this);
            this.RoomReference.Room.EnqueueMessage(message);
            this.RoomReference.Dispose();
            this.RoomReference = null;
        }
Beispiel #6
0
 protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
 {
     base.OnDisconnect(reasonCode, reasonDetail);
 }
Beispiel #7
0
        protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
        {
            System.Diagnostics.Debug.WriteLine(reasonCode.ToString());
            if(BreakEvent != null)
                BreakEvent.Invoke();

            _Fiber.Stop();
            _Fiber.Dispose();
        }
        protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
        {
            if (log.IsDebugEnabled)
            {
                log.DebugFormat("Disconnect: pid={0}: reason={1}, detail={2}", this.ConnectionId, reasonCode, reasonDetail);
            }

            // remove peer from the lobby if he has joined one
            if (this.AppLobby != null)
            {
                this.AppLobby.RemovePeer(this);
                this.AppLobby = null;
            }

            // remove the peer from the application
            this.Application = null;

            // update application statistics
            if (MasterApplication.AppStats != null)
            {
                MasterApplication.AppStats.DecrementMasterPeerCount();
                MasterApplication.AppStats.RemoveSubscriber(this);
            }
        }
 protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
 {
     Log.DebugFormat("Client Peer disconnected. Reason: {2}", this.PeerID, reasonCode.ToString());
 }
Beispiel #10
0
 protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
 {
     log.DebugFormat("GamePeer Disconnected. Reason: {0}, {1}", reasonCode, reasonDetail);
     GameServerManager.gameCore.HandleDisconnect(this);
 }