/** * Sets the timeout for receiving the response for the close_notify that was triggered by closing the * {@link Channel}. This timeout starts after the close_notify message was successfully written to the * remote peer. Use {@code 0} to directly close the {@link Channel} and not wait for the response. */ public final void setCloseNotifyReadTimeout(long closeNotifyReadTimeout, TimeUnit unit) { setCloseNotifyReadTimeoutMillis(unit.toMillis(closeNotifyReadTimeout)); }
/** * Sets the timeout for receiving the response for the close_notify that was triggered by closing the * {@link Channel}. This timeout starts after the close_notify message was successfully written to the * remote peer. Use {@code 0} to directly close the {@link Channel} and not wait for the response. */ public final void setCloseNotifyReadTimeout(long closeNotifyReadTimeout, TimeUnit unit) { setCloseNotifyReadTimeoutMillis(unit.toMillis(closeNotifyReadTimeout)); }
/** * Sets the timeout for receiving the response for the close_notify that was triggered by closing the * {@link Channel}. This timeout starts after the close_notify message was successfully written to the * remote peer. Use {@code 0} to directly close the {@link Channel} and not wait for the response. */ public final void setCloseNotifyReadTimeout(long closeNotifyReadTimeout, TimeUnit unit) { setCloseNotifyReadTimeoutMillis(unit.toMillis(closeNotifyReadTimeout)); }
/** * Sets the timeout for receiving the response for the close_notify that was triggered by closing the * {@link Channel}. This timeout starts after the close_notify message was successfully written to the * remote peer. Use {@code 0} to directly close the {@link Channel} and not wait for the response. */ public final void setCloseNotifyReadTimeout(long closeNotifyReadTimeout, TimeUnit unit) { setCloseNotifyReadTimeoutMillis(unit.toMillis(closeNotifyReadTimeout)); }
/** * Sets the timeout for receiving the response for the close_notify that was triggered by closing the * {@link Channel}. This timeout starts after the close_notify message was successfully written to the * remote peer. Use {@code 0} to directly close the {@link Channel} and not wait for the response. */ public final void setCloseNotifyReadTimeout(long closeNotifyReadTimeout, TimeUnit unit) { setCloseNotifyReadTimeoutMillis(unit.toMillis(closeNotifyReadTimeout)); }
/** * Sets the timeout for receiving the response for the close_notify that was triggered by closing the * {@link Channel}. This timeout starts after the close_notify message was successfully written to the * remote peer. Use {@code 0} to directly close the {@link Channel} and not wait for the response. */ public final void setCloseNotifyReadTimeout(long closeNotifyReadTimeout, TimeUnit unit) { setCloseNotifyReadTimeoutMillis(unit.toMillis(closeNotifyReadTimeout)); }
public void configure(SslHandler sslHandler) { sslHandler.setHandshakeTimeoutMillis(handshakeTimeoutMillis); sslHandler.setCloseNotifyFlushTimeoutMillis(closeNotifyFlushTimeoutMillis); sslHandler.setCloseNotifyReadTimeoutMillis(closeNotifyReadTimeoutMillis); if (handlerConfigurator != null) { handlerConfigurator.accept(sslHandler); } }
public void configure(SslHandler sslHandler) { sslHandler.setHandshakeTimeoutMillis(handshakeTimeoutMillis); sslHandler.setCloseNotifyFlushTimeoutMillis(closeNotifyFlushTimeoutMillis); sslHandler.setCloseNotifyReadTimeoutMillis(closeNotifyReadTimeoutMillis); if (handlerConfigurator != null) { handlerConfigurator.accept(sslHandler); } }
/** * Return a new eventual {@link SslHandler}, optionally with SNI activated * * @param allocator {@link ByteBufAllocator} to allocate for packet storage * @param sniInfo {@link Tuple2} with hostname and port for SNI (any null will skip SNI). * @return a new eventual {@link SslHandler} with SNI activated */ public SslHandler getSslHandler(ByteBufAllocator allocator, Tuple2<String, Integer> sniInfo) { SslContext sslContext = this.sslContext == null ? defaultSslContext() : this.sslContext; if (sslContext == null) { return null; } Objects.requireNonNull(allocator, "allocator"); SslHandler sslHandler; if (sniInfo != null && sniInfo.getT1() != null && sniInfo.getT2() != null) { sslHandler = sslContext.newHandler(allocator, sniInfo.getT1(), sniInfo.getT2()); } else { sslHandler = sslContext.newHandler(allocator); } sslHandler.setHandshakeTimeoutMillis(sslHandshakeTimeoutMillis); sslHandler.setCloseNotifyFlushTimeoutMillis(sslCloseNotifyFlushTimeoutMillis); sslHandler.setCloseNotifyReadTimeoutMillis(sslCloseNotifyReadTimeoutMillis); return sslHandler; }