AstralMS Based Source Ping Fix -> v145 Fix

Results 1 to 11 of 11
  1. #1
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    AstralMS Based Source Ping Fix -> v145 Fix

    I really have no idea why was this disabled....

    Code:
     @Override    
            public void sessionIdle(final IoSession session, final IdleStatus status) throws Exception {
            MapleClient client = (MapleClient) session.getAttribute(MapleClient.CLIENT_KEY);
            
            if (client != null) {
                client.sendPing ();
            }
            super.sessionIdle(session, status);
        }
    Send

    Code:
    PING((short) 0x12),
    Recv

    Code:
    PONG(false, (short) 0x46),
    Last edited by ExtremeDevilz; 09-02-14 at 10:55 AM. Reason: Code Fix


  2. #2
    Member HawtMaple is offline
    MemberRank
    Sep 2013 Join Date
    88Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix

    This will make people with slow computers DC before they reach the login screen, unless you increase the time in sendping.

    The default 60s is not enough, I had people who took 10 minutes to reach login.


    Code:
        public final void sendPing() {
            lastPing = System.currentTimeMillis();
            session.write(LoginPacket.getPing());
    
            Timer.PingTimer.getInstance().schedule(new Runnable() {
                @Override
                public void run() {
                    try {
                        if (getLatency() < 0) {
                            disconnect(true, false);
                            if (getSession().isConnected()) {
                                getSession().close(true);
                            }
                        }
                    } catch (NullPointerException e) {
                        System.out.println(e.toString());
                    }
                }
            }, 900000); // 15mins
        }

  3. #3
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix

    Quote Originally Posted by HawtMaple View Post
    This will make people with slow computers DC before they reach the login screen, unless you increase the time in sendping.

    The default 60s is not enough, I had people who took 10 minutes to reach login.


    Code:
        public final void sendPing() {
            lastPing = System.currentTimeMillis();
            session.write(LoginPacket.getPing());
    
            Timer.PingTimer.getInstance().schedule(new Runnable() {
                @Override
                public void run() {
                    try {
                        if (getLatency() < 0) {
                            disconnect(true, false);
                            if (getSession().isConnected()) {
                                getSession().close(true);
                            }
                        }
                    } catch (NullPointerException e) {
                        System.out.println(e.toString());
                    }
                }
            }, 900000); // 15mins
        }
    I'm pretty sure the client still pongs when it's being loaded.

  4. #4
    Valued Member Minike is offline
    MemberRank
    Apr 2013 Join Date
    115Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix

    Quote Originally Posted by HawtMaple View Post
    This will make people with slow computers DC before they reach the login screen, unless you increase the time in sendping.

    The default 60s is not enough, I had people who took 10 minutes to reach login.
    Only start ping cycle when the client gives the "oke" when its at login?
    Aka you didnt code it properly, gj

  5. #5
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix

    Quote Originally Posted by HawtMaple View Post
    This will make people with slow computers DC before they reach the login screen, unless you increase the time in sendping.

    The default 60s is not enough, I had people who took 10 minutes to reach login.


    Code:
        public final void sendPing() {
            lastPing = System.currentTimeMillis();
            session.write(LoginPacket.getPing());
    
            Timer.PingTimer.getInstance().schedule(new Runnable() {
                @Override
                public void run() {
                    try {
                        if (getLatency() < 0) {
                            disconnect(true, false);
                            if (getSession().isConnected()) {
                                getSession().close(true);
                            }
                        }
                    } catch (NullPointerException e) {
                        System.out.println(e.toString());
                    }
                }
            }, 900000); // 15mins
        }
    what are you on about ? the client sents a ping when it receive a pong..

  6. #6
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix

    Quote Originally Posted by Multo View Post
    what are you on about ? the client sents a ping when it receive a pong..
    Uhhh... what? What are you on about? Does the server ping it's clients, or does the client ping it's server?! Obviously the server has to ping it's client to make sure the connection is still alive. Pong is the response, Ping is the action of pinging.
    Anyways, he meant that the client won't respond to your pings if it's loading. It will, though.

  7. #7
    Account Upgraded | Title Enabled! Halcyon is online now
    MemberRank
    Mar 2011 Join Date
    1,103Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix


    PING, PONG, PING, PONG, PING, PONG.

    OT: With Hawt's cilent, It always takes me a long time to connect, like he said.

  8. #8
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix

    Well, after looking again the client does not respond on load, what a shame. Although I'm pretty sure Nexon are most likely using what minike mentioned, and ignoring the ping fails until the login screen actually shows up.

    Fun fact : Nexon pings their clients approx. every 13.5s on average.

  9. #9
    PeterRabbit retep998 is offline
    MemberRank
    Apr 2008 Join Date
    VanaLocation
    707Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix

    I know from personal experience with my laptop, that because it takes over a minute to load up MapleStory, I cannot connect to either private servers or the official servers. The moment I hit the login screen it immediately shuts down saying I was disconnected.

  10. #10
    Banned SilentThief is offline
    BannedRank
    Sep 2012 Join Date
    The MatrixLocation
    466Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix

    Multo, do you test your code before releasing it?

    Agreed @Dynamik

  11. #11
    while(true) spam(); kevintjuh93 is offline
    MemberRank
    Jun 2008 Join Date
    The NetherlandsLocation
    4,119Posts

    Re: AstralMS Based Source Ping Fix -> v145 Fix

    Indeed, I had the same as Peter. Now what I thought that the opcode that is being sent to the server (which some of you use as AUTO_LOGIN), is some sort of START_ALIVE_ACK.



Advertisement