Search in sources :

Example 1 with CompressionHandler

use of net.glowstone.net.pipeline.CompressionHandler in project Glowstone by GlowstoneMC.

the class GlowSession method enableCompression.

public void enableCompression(int threshold) {
    // set compression can only be sent once
    if (!compresssionSent) {
        send(new SetCompressionMessage(threshold));
        updatePipeline("compression", new CompressionHandler(threshold));
        compresssionSent = true;
    }
}
Also used : SetCompressionMessage(net.glowstone.net.message.SetCompressionMessage) CompressionHandler(net.glowstone.net.pipeline.CompressionHandler)

Aggregations

SetCompressionMessage (net.glowstone.net.message.SetCompressionMessage)1 CompressionHandler (net.glowstone.net.pipeline.CompressionHandler)1