@Override protected void doBind(SocketAddress localAddress) throws Exception { super.doBind(localAddress); // TODO(scott): tcp fast open here! socket.listen(config.getBacklog()); active = true; }
@Override protected void doClose() throws Exception { try { super.doClose(); } finally { DomainSocketAddress local = this.local; if (local != null) { // Delete the socket file if possible. File socketFile = new File(local.path()); boolean success = socketFile.delete(); if (!success && logger.isDebugEnabled()) { logger.debug("Failed to delete a domain socket file: {}", local.path()); } } } }
AbstractKQueueServerChannel(BsdSocket fd) { this(fd, isSoErrorZero(fd)); }
@Override void readReady(KQueueRecvByteAllocatorHandle allocHandle) { assert eventLoop().inEventLoop(); final ChannelConfig config = config(); if (shouldBreakReadReady(config)) { clearReadFilter0(); return; final ChannelPipeline pipeline = pipeline(); allocHandle.reset(config); allocHandle.attemptedBytesRead(1); pipeline.fireChannelRead(newChildChannel(acceptFd, acceptedAddress, 1, acceptedAddress[0])); } while (allocHandle.continueReading());
@Override public DomainSocketAddress localAddress() { return (DomainSocketAddress) super.localAddress(); } }
@Override public InetSocketAddress remoteAddress() { return (InetSocketAddress) super.remoteAddress(); }
@Override void readReady(KQueueRecvByteAllocatorHandle allocHandle) { assert eventLoop().inEventLoop(); final ChannelConfig config = config(); if (shouldBreakReadReady(config)) { clearReadFilter0(); return; final ChannelPipeline pipeline = pipeline(); allocHandle.reset(config); allocHandle.attemptedBytesRead(1); pipeline.fireChannelRead(newChildChannel(acceptFd, acceptedAddress, 1, acceptedAddress[0])); } while (allocHandle.continueReading());
@Override public InetSocketAddress localAddress() { return (InetSocketAddress) super.localAddress(); }
@Override public DomainSocketAddress remoteAddress() { return (DomainSocketAddress) super.remoteAddress(); }
@Override void readReady(KQueueRecvByteAllocatorHandle allocHandle) { assert eventLoop().inEventLoop(); final ChannelConfig config = config(); if (shouldBreakReadReady(config)) { clearReadFilter0(); return; final ChannelPipeline pipeline = pipeline(); allocHandle.reset(config); allocHandle.attemptedBytesRead(1); pipeline.fireChannelRead(newChildChannel(acceptFd, acceptedAddress, 1, acceptedAddress[0])); } while (allocHandle.continueReading());
@Override public DomainSocketAddress localAddress() { return (DomainSocketAddress) super.localAddress(); } }
@Override public DomainSocketAddress remoteAddress() { return (DomainSocketAddress) super.remoteAddress(); }
@Override protected void doBind(SocketAddress localAddress) throws Exception { super.doBind(localAddress); // TODO(scott): tcp fast open here! socket.listen(config.getBacklog()); active = true; }
AbstractKQueueServerChannel(BsdSocket fd) { this(fd, isSoErrorZero(fd)); }
@Override protected void doClose() throws Exception { try { super.doClose(); } finally { DomainSocketAddress local = this.local; if (local != null) { // Delete the socket file if possible. File socketFile = new File(local.path()); boolean success = socketFile.delete(); if (!success && logger.isDebugEnabled()) { logger.debug("Failed to delete a domain socket file: {}", local.path()); } } } }
@Override void readReady(KQueueRecvByteAllocatorHandle allocHandle) { assert eventLoop().inEventLoop(); final ChannelConfig config = config(); if (shouldBreakReadReady(config)) { clearReadFilter0(); return; final ChannelPipeline pipeline = pipeline(); allocHandle.reset(config); allocHandle.attemptedBytesRead(1); pipeline.fireChannelRead(newChildChannel(acceptFd, acceptedAddress, 1, acceptedAddress[0])); } while (allocHandle.continueReading());
@Override public InetSocketAddress localAddress() { return (InetSocketAddress) super.localAddress(); }
@Override public InetSocketAddress remoteAddress() { return (InetSocketAddress) super.remoteAddress(); }
@Override protected void doBind(SocketAddress localAddress) throws Exception { super.doBind(localAddress); // TODO(scott): tcp fast open here! socket.listen(config.getBacklog()); active = true; }
AbstractKQueueServerChannel(BsdSocket fd) { this(fd, isSoErrorZero(fd)); }