Package net.glowstone.net.message

Examples of net.glowstone.net.message.SetCompressionMessage


    public void enableEncryption(SecretKey sharedSecret) {
        updatePipeline("encryption", new EncryptionHandler(sharedSecret));
    }

    public void enableCompression(int threshold) {
        send(new SetCompressionMessage(threshold));
        updatePipeline("compression", new CompressionHandler(threshold));
    }
View Full Code Here


        send(new SetCompressionMessage(threshold));
        updatePipeline("compression", new CompressionHandler(threshold));
    }

    public void disableCompression() {
        send(new SetCompressionMessage(-1));
        updatePipeline("compression", NoopHandler.INSTANCE);
    }
View Full Code Here

public final class SetCompressionCodec implements Codec<SetCompressionMessage> {
    @Override
    public SetCompressionMessage decode(ByteBuf buf) throws IOException {
        int threshold = ByteBufUtils.readVarInt(buf);
        return new SetCompressionMessage(threshold);
    }
View Full Code Here

TOP

Related Classes of net.glowstone.net.message.SetCompressionMessage

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.