Exemplo n.º 1
0
        /// <summary>
        /// Closes and clears a child socket (established connection), without causing exceptions.
        /// </summary>
        /// <param name="childSocket">The child socket to close. May be null.</param>
        private void ResetChildSocket(ServerChildTcpSocket childSocket)
        {
            // Close the child socket if possible
            if (childSocket != null)
            {
                childSocket.Close();
            }

            // Remove it from the list of child sockets
            ChildSockets.Remove(childSocket);
        }
Exemplo n.º 2
0
        public GameSocket Disconnect(string reason = "No reason given")
        {
            if (_internalSocket != null)
            {
                _internalSocket.Close();
            }
            CoreManager.ServerCore.StandardOut.Notice("Game Socket Manager", CoreManager.ServerCore.StringLocale.GetString("CORE:INFO_NETWORK_CONNECTION_CLOSED", reason));

            Protocol.HandlerInvokerManager.DeregisterGameSocket(this);
            Habbo.LoggedIn = false;
            Habbo.Socket   = null;
            Habbo          = null;
            return(this);
        }
Exemplo n.º 3
0
        public GameSocket Disconnect(string reason = "No reason given")
        {
            GameSocketEventArgs eventArgs = new GameSocketEventArgs(this, false);

            CoreManager.ServerCore.OfficalEventFirer.Fire("gamesocket_disconnected:before", eventArgs);

            if (_internalSocket != null)
            {
                _internalSocket.Close();
            }
            CoreManager.ServerCore.ConsoleManager.Notice("Game Socket Manager", CoreManager.ServerCore.StringLocale.GetString("CORE:INFO_NETWORK_CONNECTION_CLOSED", reason));

            GameSocketManager.Protocol.HandlerInvokerManager.DeregisterGameSocket(this);
            Habbo.LoggedIn = false;
            Habbo.Socket   = null;
            Habbo          = null;
            return(this);
        }