Java 类io.netty.channel.socket.ChannelInputShutdownEvent 实例源码

项目:netty4.0.27Learn    文件:SocketShutdownOutputByPeerTest.java   
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
    if (evt instanceof ChannelInputShutdownEvent) {
        halfClosureCount.incrementAndGet();
        halfClosure.countDown();
    }
}
项目:netty4.0.27Learn    文件:AbstractNioByteChannel.java   
private void closeOnRead(ChannelPipeline pipeline) {
    SelectionKey key = selectionKey();
    setInputShutdown();
    if (isOpen()) {
        if (Boolean.TRUE.equals(config().getOption(ChannelOption.ALLOW_HALF_CLOSURE))) {
            key.interestOps(key.interestOps() & ~readInterestOp);
            pipeline.fireUserEventTriggered(ChannelInputShutdownEvent.INSTANCE);
        } else {
            close(voidPromise());
        }
    }
}
项目:netty4.0.27Learn    文件:AbstractEpollStreamChannel.java   
private void closeOnRead(ChannelPipeline pipeline) {
    inputShutdown = true;
    if (isOpen()) {
        if (Boolean.TRUE.equals(config().getOption(ChannelOption.ALLOW_HALF_CLOSURE))) {
            clearEpollIn0();
            pipeline.fireUserEventTriggered(ChannelInputShutdownEvent.INSTANCE);
        } else {
            close(voidPromise());
        }
    }
}
项目:netty4study    文件:SocketShutdownOutputByPeerTest.java   
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
    if (evt instanceof ChannelInputShutdownEvent) {
        halfClosureCount.incrementAndGet();
        halfClosure.countDown();
    }
}
项目:netty4study    文件:AbstractNioByteChannel.java   
private void closeOnRead(ChannelPipeline pipeline) {
    SelectionKey key = selectionKey();
    setInputShutdown();
    if (isOpen()) {
        if (Boolean.TRUE.equals(config().getOption(ChannelOption.ALLOW_HALF_CLOSURE))) {
            key.interestOps(key.interestOps() & ~readInterestOp);
            pipeline.fireUserEventTriggered(ChannelInputShutdownEvent.INSTANCE);
        } else {
            close(voidPromise());
        }
    }
}
项目:netty-netty-5.0.0.Alpha1    文件:SocketShutdownOutputByPeerTest.java   
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
    if (evt instanceof ChannelInputShutdownEvent) {
        halfClosureCount.incrementAndGet();
        halfClosure.countDown();
    }
}
项目:netty-netty-5.0.0.Alpha1    文件:AbstractNioByteChannel.java   
private void closeOnRead(ChannelPipeline pipeline) {
    SelectionKey key = selectionKey();
    setInputShutdown();
    if (isOpen()) {
        if (Boolean.TRUE.equals(config().getOption(ChannelOption.ALLOW_HALF_CLOSURE))) {
            key.interestOps(key.interestOps() & ~readInterestOp);
            pipeline.fireUserEventTriggered(ChannelInputShutdownEvent.INSTANCE);
        } else {
            close(voidPromise());
        }
    }
}