@Override public ServerBootstrap configure() { return TcpServerBind.INSTANCE.createServerBootstrap(); } }.bindNow();
@Override public Mono<? extends DisposableServer> bind(ServerBootstrap b) { SslProvider ssl = SslProvider.findSslSupport(b); if (ssl != null && ssl.getDefaultConfigurationType() == null) { ssl = SslProvider.updateDefaultConfiguration(ssl, SslProvider.DefaultConfigurationType.TCP); SslProvider.setBootstrap(b, ssl); } if (b.config() .group() == null) { TcpServerRunOn.configure(b, LoopResources.DEFAULT_NATIVE, TcpResources.get()); } return Mono.create(sink -> { ServerBootstrap bootstrap = b.clone(); ConnectionObserver obs = BootstrapHandlers.connectionObserver(bootstrap); ConnectionObserver childObs = BootstrapHandlers.childConnectionObserver(bootstrap); ChannelOperations.OnSetup ops = BootstrapHandlers.channelOperationFactory(bootstrap); convertLazyLocalAddress(bootstrap); BootstrapHandlers.finalizeHandler(bootstrap, ops, new ChildObserver(childObs)); ChannelFuture f = bootstrap.bind(); DisposableBind disposableServer = new DisposableBind(sink, f, obs, bootstrap); f.addListener(disposableServer); sink.onCancel(disposableServer); }); }
@Override public Mono<? extends DisposableServer> bind(ServerBootstrap b) { SslProvider ssl = SslProvider.findSslSupport(b); if (ssl != null && ssl.getDefaultConfigurationType() == null) { ssl = SslProvider.updateDefaultConfiguration(ssl, SslProvider.DefaultConfigurationType.TCP); SslProvider.setBootstrap(b, ssl); } if (b.config() .group() == null) { TcpServerRunOn.configure(b, LoopResources.DEFAULT_NATIVE, TcpResources.get()); } return Mono.create(sink -> { ServerBootstrap bootstrap = b.clone(); ConnectionObserver obs = BootstrapHandlers.connectionObserver(bootstrap); ConnectionObserver childObs = BootstrapHandlers.childConnectionObserver(bootstrap); ChannelOperations.OnSetup ops = BootstrapHandlers.channelOperationFactory(bootstrap); convertLazyLocalAddress(bootstrap); BootstrapHandlers.finalizeHandler(bootstrap, ops, new ChildObserver(childObs)); ChannelFuture f = bootstrap.bind(); DisposableBind disposableServer = new DisposableBind(sink, f, obs, bootstrap); f.addListener(disposableServer); sink.onCancel(disposableServer); }); }
TcpServerBind() { this.serverBootstrap = createServerBootstrap(); BootstrapHandlers.channelOperationFactory(this.serverBootstrap, TcpUtils.TCP_OPS); }
TcpServerBind() { this.serverBootstrap = createServerBootstrap(); BootstrapHandlers.channelOperationFactory(this.serverBootstrap, TcpUtils.TCP_OPS); }