Disposes of this connection, releasing channel buffers that it holds.
public virtual void Disconnect() { m_AsyncConnect = ConnectState.Disconnected; ClientScene.HandleClientDisconnect(m_Connection); if (m_Connection != null) { m_Connection.Disconnect(); m_Connection.Dispose(); m_Connection = null; NetworkTransport.RemoveHost(m_ClientId); } }
public void DisconnectAllConnections() { for (int i = 0; i < m_Connections.Count; i++) { NetworkConnection conn = m_Connections[i]; if (conn != null) { conn.Disconnect(); conn.Dispose(); } } }
/// <summary> /// <para>This disconnects all of the active connections.</para> /// </summary> public void DisconnectAllConnections() { for (int index = 0; index < this.m_Connections.Count; ++index) { NetworkConnection connection = this.m_Connections[index]; if (connection != null) { connection.Disconnect(); connection.Dispose(); } } }
public void DisconnectAllConnections() { for (int i = 0; i < this.m_Connections.Count; i++) { NetworkConnection networkConnection = this.m_Connections[i]; if (networkConnection != null) { networkConnection.Disconnect(); networkConnection.Dispose(); } } }
private void OnDisconnected(NetworkConnection conn) { conn.InvokeHandlerNoData(0x21); for (int i = 0; i < conn.playerControllers.Count; i++) { if ((conn.playerControllers[i].gameObject != null) && LogFilter.logWarn) { Debug.LogWarning("Player not destroyed when connection disconnected."); } } if (LogFilter.logDebug) { Debug.Log("Server lost client:" + conn.connectionId); } conn.RemoveObservers(); conn.Dispose(); }