@Override protected final void doBeginRead() throws Exception { // Channel.read() or ChannelHandlerContext.read() was called final AbstractKQueueUnsafe unsafe = (AbstractKQueueUnsafe) unsafe(); unsafe.readPending = true; // We must set the read flag here as it is possible the user didn't read in the last read loop, the // executeReadReadyRunnable could read nothing, and if the user doesn't explicitly call read they will // never get data after this. readFilter(true); // If auto read was toggled off on the last read loop then we may not be notified // again if we didn't consume all the data. So we force a read operation here if there maybe more data. if (unsafe.maybeMoreDataToRead) { unsafe.executeReadReadyRunnable(config()); } }
@Override protected void doDeregister() throws Exception { // Make sure we unregister our filters from kqueue! readFilter(false); writeFilter(false); evSet0(Native.EVFILT_SOCK, Native.EV_DELETE, 0); ((KQueueEventLoop) eventLoop()).remove(this); }
@Override protected final void doBeginRead() throws Exception { // Channel.read() or ChannelHandlerContext.read() was called final AbstractKQueueUnsafe unsafe = (AbstractKQueueUnsafe) unsafe(); unsafe.readPending = true; // We must set the read flag here as it is possible the user didn't read in the last read loop, the // executeReadReadyRunnable could read nothing, and if the user doesn't explicitly call read they will // never get data after this. readFilter(true); // If auto read was toggled off on the last read loop then we may not be notified // again if we didn't consume all the data. So we force a read operation here if there maybe more data. if (unsafe.maybeMoreDataToRead) { unsafe.executeReadReadyRunnable(config()); } }
@Override protected void doDeregister() throws Exception { // Make sure we unregister our filters from kqueue! readFilter(false); writeFilter(false); evSet0(Native.EVFILT_SOCK, Native.EV_DELETE, 0); ((KQueueEventLoop) eventLoop()).remove(this); }
protected final void clearReadFilter0() { assert eventLoop().inEventLoop(); try { readPending = false; readFilter(false); } catch (IOException e) { // When this happens there is something completely wrong with either the filedescriptor or epoll, // so fire the exception through the pipeline and close the Channel. pipeline().fireExceptionCaught(e); unsafe().close(unsafe().voidPromise()); } }
protected final void clearReadFilter0() { assert eventLoop().inEventLoop(); try { readPending = false; readFilter(false); } catch (IOException e) { // When this happens there is something completely wrong with either the filedescriptor or epoll, // so fire the exception through the pipeline and close the Channel. pipeline().fireExceptionCaught(e); unsafe().close(unsafe().voidPromise()); } }
@Override protected final void doBeginRead() throws Exception { // Channel.read() or ChannelHandlerContext.read() was called final AbstractKQueueUnsafe unsafe = (AbstractKQueueUnsafe) unsafe(); unsafe.readPending = true; // We must set the read flag here as it is possible the user didn't read in the last read loop, the // executeReadReadyRunnable could read nothing, and if the user doesn't explicitly call read they will // never get data after this. readFilter(true); // If auto read was toggled off on the last read loop then we may not be notified // again if we didn't consume all the data. So we force a read operation here if there maybe more data. if (unsafe.maybeMoreDataToRead) { unsafe.executeReadReadyRunnable(config()); } }
@Override protected final void doBeginRead() throws Exception { // Channel.read() or ChannelHandlerContext.read() was called final AbstractKQueueUnsafe unsafe = (AbstractKQueueUnsafe) unsafe(); unsafe.readPending = true; // We must set the read flag here as it is possible the user didn't read in the last read loop, the // executeReadReadyRunnable could read nothing, and if the user doesn't explicitly call read they will // never get data after this. readFilter(true); // If auto read was toggled off on the last read loop then we may not be notified // again if we didn't consume all the data. So we force a read operation here if there maybe more data. if (unsafe.maybeMoreDataToRead) { unsafe.executeReadReadyRunnable(config()); } }
@Override protected final void doBeginRead() throws Exception { // Channel.read() or ChannelHandlerContext.read() was called final AbstractKQueueUnsafe unsafe = (AbstractKQueueUnsafe) unsafe(); unsafe.readPending = true; // We must set the read flag here as it is possible the user didn't read in the last read loop, the // executeReadReadyRunnable could read nothing, and if the user doesn't explicitly call read they will // never get data after this. readFilter(true); // If auto read was toggled off on the last read loop then we may not be notified // again if we didn't consume all the data. So we force a read operation here if there maybe more data. if (unsafe.maybeMoreDataToRead) { unsafe.executeReadReadyRunnable(config()); } }
@Override protected final void doBeginRead() throws Exception { // Channel.read() or ChannelHandlerContext.read() was called final AbstractKQueueUnsafe unsafe = (AbstractKQueueUnsafe) unsafe(); unsafe.readPending = true; // We must set the read flag here as it is possible the user didn't read in the last read loop, the // executeReadReadyRunnable could read nothing, and if the user doesn't explicitly call read they will // never get data after this. readFilter(true); // If auto read was toggled off on the last read loop then we may not be notified // again if we didn't consume all the data. So we force a read operation here if there maybe more data. if (unsafe.maybeMoreDataToRead) { unsafe.executeReadReadyRunnable(config()); } }
@Override protected void doDeregister() throws Exception { // Make sure we unregister our filters from kqueue! readFilter(false); writeFilter(false); evSet0(Native.EVFILT_SOCK, Native.EV_DELETE, 0); ((KQueueEventLoop) eventLoop()).remove(this); }
@Override protected void doDeregister() throws Exception { // Make sure we unregister our filters from kqueue! readFilter(false); writeFilter(false); evSet0(Native.EVFILT_SOCK, Native.EV_DELETE, 0); ((KQueueEventLoop) eventLoop()).remove(this); }
@Override protected void doDeregister() throws Exception { // Make sure we unregister our filters from kqueue! readFilter(false); writeFilter(false); evSet0(Native.EVFILT_SOCK, Native.EV_DELETE, 0); ((KQueueEventLoop) eventLoop()).remove(this); // Set the filters back to the initial state in case this channel is registered with another event loop. readFilterEnabled = true; }
@Override protected void doDeregister() throws Exception { // Make sure we unregister our filters from kqueue! readFilter(false); writeFilter(false); evSet0(Native.EVFILT_SOCK, Native.EV_DELETE, 0); ((KQueueEventLoop) eventLoop()).remove(this); // Set the filters back to the initial state in case this channel is registered with another event loop. readFilterEnabled = true; }
protected final void clearReadFilter0() { assert eventLoop().inEventLoop(); try { readPending = false; readFilter(false); } catch (IOException e) { // When this happens there is something completely wrong with either the filedescriptor or epoll, // so fire the exception through the pipeline and close the Channel. pipeline().fireExceptionCaught(e); unsafe().close(unsafe().voidPromise()); } }
protected final void clearReadFilter0() { assert eventLoop().inEventLoop(); try { readPending = false; readFilter(false); } catch (IOException e) { // When this happens there is something completely wrong with either the filedescriptor or epoll, // so fire the exception through the pipeline and close the Channel. pipeline().fireExceptionCaught(e); unsafe().close(unsafe().voidPromise()); } }
protected final void clearReadFilter0() { assert eventLoop().inEventLoop(); try { readPending = false; readFilter(false); } catch (IOException e) { // When this happens there is something completely wrong with either the filedescriptor or epoll, // so fire the exception through the pipeline and close the Channel. pipeline().fireExceptionCaught(e); unsafe().close(unsafe().voidPromise()); } }
protected final void clearReadFilter0() { assert eventLoop().inEventLoop(); try { readPending = false; readFilter(false); } catch (IOException e) { // When this happens there is something completely wrong with either the filedescriptor or epoll, // so fire the exception through the pipeline and close the Channel. pipeline().fireExceptionCaught(e); unsafe().close(unsafe().voidPromise()); } }