protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail) { base.OnDisconnect(reasonCode, reasonDetail); if (this.application.AppStatsPublisher != null) { this.application.AppStatsPublisher.DecrementPeerCount(); } }
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) { 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); } this.lobby.RemovePeer(this); if (MasterApplication.AppStats != null) { MasterApplication.AppStats.DecrementMasterPeerCount(); MasterApplication.AppStats.RemoveSubscriber(this); } }
//处理客户端断开连接后续工作 protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail) { PureGameServer._instance.clientList.Remove(this); EventData ed = new EventData((byte)EventCode.DeletePlayer) { Parameters = new Dictionary <byte, object>() }; ed.Parameters.Add(ed.Code, playerData.UserName); foreach (Client c in PureGameServer._instance.clientList) { if (c != this) { c.SendEvent(ed, new SendParameters()); } } }
protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail) { if (log.IsDebugEnabled) { log.DebugFormat("Disconnect: peer={0}, UserId:{3}: reason={1}, detail={2}", this, reasonCode, reasonDetail, this.UserId); } // remove peer from the lobby if he has joined one this.LeaveLobby(); // remove the peer from the application this.Application = null; // update application statistics if (MasterApplication.AppStats != null) { MasterApplication.AppStats.DecrementMasterPeerCount(); MasterApplication.AppStats.RemoveSubscriber(this); } this.StopWaitForAuthRequest(); }
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; }
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) { MyGameServer.Instance.peerList.Remove(this); }
protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail) { Log.InfoFormat("Peer disconnected: {0}, {1}", reasonCode, reasonDetail); _application.DestroyPeer(this); }
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) { Main.log.Info("客户端断开连接"); }
protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail) { _server.ConnectionCollection.OnClientDisconnect(this); Log.DebugFormat("Client {0} disconnected", _peerID); }
//断开连接时 protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail) { MyGameServer.log.Info("有一个客户端断开了连接"); }
protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail) { base.OnDisconnect(reasonCode, reasonDetail); }