Example usage for io.netty.channel.epoll EpollSocketChannel EpollSocketChannel

List of usage examples for io.netty.channel.epoll EpollSocketChannel EpollSocketChannel

Introduction

In this page you can find the example usage for io.netty.channel.epoll EpollSocketChannel EpollSocketChannel.

Prototype

public EpollSocketChannel() 

Source Link

Usage

From source file:org.asynchttpclient.netty.channel.EpollSocketChannelFactory.java

License:Open Source License

@Override
public EpollSocketChannel newChannel() {
    return new EpollSocketChannel();
}

From source file:org.jupiter.transport.netty.TcpChannelProvider.java

License:Apache License

@SuppressWarnings("unchecked")
@Override//from   ww w  . j ava2  s  .c  o m
public T newChannel() {
    switch (kindChannel) {
    case ACCEPTOR:
        switch (typeIO) {
        case NIO:
            return (T) new NioServerSocketChannel();
        case NATIVE:
            return (T) new EpollServerSocketChannel();
        default:
            throw new IllegalStateException("invalid type IO: " + typeIO);
        }
    case CONNECTOR:
        switch (typeIO) {
        case NIO:
            return (T) new NioSocketChannel();
        case NATIVE:
            return (T) new EpollSocketChannel();
        default:
            throw new IllegalStateException("invalid type IO: " + typeIO);
        }
    default:
        throw new IllegalStateException("invalid kind channel: " + kindChannel);
    }
}