Package net.glowstone.net.message.play.game

Examples of net.glowstone.net.message.play.game.PingMessage


        // let us know if the client has timed out yet
        if (readTimeoutCounter >= TIMEOUT_TICKS) {
            if (pingMessageId == 0 && getProtocol() instanceof PlayProtocol) {
                pingMessageId = random.nextInt();
                send(new PingMessage(pingMessageId));
            } else {
                disconnect("Timed out");
            }
            readTimeoutCounter = 0;
        }

        // let the client know we haven't timed out yet
        if (writeTimeoutCounter >= TIMEOUT_TICKS && getProtocol() instanceof PlayProtocol) {
            pingMessageId = random.nextInt();
            send(new PingMessage(pingMessageId));
        }
    }
View Full Code Here


import java.io.IOException;

public final class PingCodec implements Codec<PingMessage> {
    @Override
    public PingMessage decode(ByteBuf buffer) throws IOException {
        return new PingMessage(ByteBufUtils.readVarInt(buffer));
    }
View Full Code Here

TOP

Related Classes of net.glowstone.net.message.play.game.PingMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.