@Override protected Channel newChildChannel(int fd, byte[] address, int offset, int len) throws Exception { return new KQueueSocketChannel(this, new BsdSocket(fd), address(address, offset, len)); } }
@Override protected Executor prepareToClose() { try { // Check isOpen() first as otherwise it will throw a RuntimeException // when call getSoLinger() as the fd is not valid anymore. if (isOpen() && config().getSoLinger() > 0) { // We need to cancel this key of the channel so we may not end up in a eventloop spin // because we try to read or write until the actual close happens which may be later due // SO_LINGER handling. // See https://github.com/netty/netty/issues/4449 ((KQueueEventLoop) eventLoop()).remove(KQueueSocketChannel.this); return GlobalEventExecutor.INSTANCE; } } catch (Throwable ignore) { // Ignore the error as the underlying channel may be closed in the meantime and so // getSoLinger() may produce an exception. In this case we just return null. // See https://github.com/netty/netty/issues/4449 } return null; } }
@Override protected Executor prepareToClose() { try { // Check isOpen() first as otherwise it will throw a RuntimeException // when call getSoLinger() as the fd is not valid anymore. if (isOpen() && config().getSoLinger() > 0) { // We need to cancel this key of the channel so we may not end up in a eventloop spin // because we try to read or write until the actual close happens which may be later due // SO_LINGER handling. // See https://github.com/netty/netty/issues/4449 ((KQueueEventLoop) eventLoop()).remove(KQueueSocketChannel.this); return GlobalEventExecutor.INSTANCE; } } catch (Throwable ignore) { // Ignore the error as the underlying channel may be closed in the meantime and so // getSoLinger() may produce an exception. In this case we just return null. // See https://github.com/netty/netty/issues/4449 } return null; } }
@Override protected Channel newChildChannel(int fd, byte[] address, int offset, int len) throws Exception { return new KQueueSocketChannel(this, new BsdSocket(fd), address(address, offset, len)); } }
@Override protected Executor prepareToClose() { try { // Check isOpen() first as otherwise it will throw a RuntimeException // when call getSoLinger() as the fd is not valid anymore. if (isOpen() && config().getSoLinger() > 0) { // We need to cancel this key of the channel so we may not end up in a eventloop spin // because we try to read or write until the actual close happens which may be later due // SO_LINGER handling. // See https://github.com/netty/netty/issues/4449 ((KQueueEventLoop) eventLoop()).remove(KQueueSocketChannel.this); return GlobalEventExecutor.INSTANCE; } } catch (Throwable ignore) { // Ignore the error as the underlying channel may be closed in the meantime and so // getSoLinger() may produce an exception. In this case we just return null. // See https://github.com/netty/netty/issues/4449 } return null; } }
return (T) new EpollSocketChannel(); case NATIVE_KQUEUE: return (T) new KQueueSocketChannel(); case NATIVE_EPOLL_DOMAIN: return (T) new EpollDomainSocketChannel();
@Override protected Executor prepareToClose() { try { // Check isOpen() first as otherwise it will throw a RuntimeException // when call getSoLinger() as the fd is not valid anymore. if (isOpen() && config().getSoLinger() > 0) { // We need to cancel this key of the channel so we may not end up in a eventloop spin // because we try to read or write until the actual close happens which may be later due // SO_LINGER handling. // See https://github.com/netty/netty/issues/4449 ((KQueueEventLoop) eventLoop()).remove(KQueueSocketChannel.this); return GlobalEventExecutor.INSTANCE; } } catch (Throwable ignore) { // Ignore the error as the underlying channel may be closed in the meantime and so // getSoLinger() may produce an exception. In this case we just return null. // See https://github.com/netty/netty/issues/4449 } return null; } }
return (T) new EpollSocketChannel(); case NATIVE_KQUEUE: return (T) new KQueueSocketChannel(); case NATIVE_EPOLL_DOMAIN: return (T) new EpollDomainSocketChannel();
@Override protected Executor prepareToClose() { try { // Check isOpen() first as otherwise it will throw a RuntimeException // when call getSoLinger() as the fd is not valid anymore. if (isOpen() && config().getSoLinger() > 0) { // We need to cancel this key of the channel so we may not end up in a eventloop spin // because we try to read or write until the actual close happens which may be later due // SO_LINGER handling. // See https://github.com/netty/netty/issues/4449 ((KQueueEventLoop) eventLoop()).remove(KQueueSocketChannel.this); return GlobalEventExecutor.INSTANCE; } } catch (Throwable ignore) { // Ignore the error as the underlying channel may be closed in the meantime and so // getSoLinger() may produce an exception. In this case we just return null. // See https://github.com/netty/netty/issues/4449 } return null; } }
@Override protected Channel newChildChannel(int fd, byte[] address, int offset, int len) throws Exception { return new KQueueSocketChannel(this, new BsdSocket(fd), address(address, offset, len)); } }
@Override protected Executor prepareToClose() { try { // Check isOpen() first as otherwise it will throw a RuntimeException // when call getSoLinger() as the fd is not valid anymore. if (isOpen() && config().getSoLinger() > 0) { // We need to cancel this key of the channel so we may not end up in a eventloop spin // because we try to read or write until the actual close happens which may be later due // SO_LINGER handling. // See https://github.com/netty/netty/issues/4449 ((KQueueEventLoop) eventLoop()).remove(KQueueSocketChannel.this); return GlobalEventExecutor.INSTANCE; } } catch (Throwable ignore) { // Ignore the error as the underlying channel may be closed in the meantime and so // getSoLinger() may produce an exception. In this case we just return null. // See https://github.com/netty/netty/issues/4449 } return null; } }
@Override protected Channel newChildChannel(int fd, byte[] address, int offset, int len) throws Exception { return new KQueueSocketChannel(this, new BsdSocket(fd), address(address, offset, len)); } }
@Override protected Channel newChildChannel(int fd, byte[] address, int offset, int len) throws Exception { return new KQueueSocketChannel(this, new BsdSocket(fd), address(address, offset, len)); } }
@Override protected Channel newChildChannel(int fd, byte[] address, int offset, int len) throws Exception { return new KQueueSocketChannel(this, new BsdSocket(fd), address(address, offset, len)); } }
return (T) new EpollSocketChannel(); case NATIVE_KQUEUE: return (T) new KQueueSocketChannel(); case NATIVE_EPOLL_DOMAIN: return (T) new EpollDomainSocketChannel();
return (T) new EpollSocketChannel(); case NATIVE_KQUEUE: return (T) new KQueueSocketChannel(); case NATIVE_EPOLL_DOMAIN: return (T) new EpollDomainSocketChannel();