All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.netty.channel.ChannelUtils Maven / Gradle / Ivy

package io.netty.channel;

import io.netty.channel.epoll.EpollUtils;
import io.netty.channel.nio.AbstractNioChannel;

public class ChannelUtils {

    public static void forceFlush(Channel channel) {
        Channel.Unsafe unsafe = channel.unsafe();
        if (unsafe instanceof AbstractNioChannel.NioUnsafe) {
            ((AbstractNioChannel.NioUnsafe) unsafe).forceFlush();
        } else {
            EpollUtils.forceFlush(unsafe);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy