private void handleConnect(SocketAddress remoteAddress, SocketAddress peerAddress, String serverName, Handler<AsyncResult<Channel>> channelHandler) { VertxInternal vertx = context.owner(); bootstrap.resolver(vertx.nettyAddressResolverGroup()); bootstrap.handler(new ChannelInitializer<Channel>() { @Override protected void initChannel(Channel ch) { initSSL(peerAddress, serverName, ch, channelHandler); } }); ChannelFuture fut = bootstrap.connect(vertx.transport().convert(remoteAddress, false)); fut.addListener(res -> { if (res.isSuccess()) { connected(fut.channel(), channelHandler); } else { channelHandler.handle(io.vertx.core.Future.failedFuture(res.cause())); } }); }
bootstrap.channelFactory(vertx.transport().serverChannelFactory(socketAddress.path() != null)); if (socketAddress.path() != null) { java.net.SocketAddress converted = vertx.transport().convert(socketAddress, true); ChannelFuture future = bootstrap.bind(converted); future.addListener(f -> {
java.net.SocketAddress targetAddress = vertx.transport().convert(remoteAddress, false);
private void handleConnect(SocketAddress remoteAddress, SocketAddress peerAddress, String serverName, Handler<AsyncResult<Channel>> channelHandler) { VertxInternal vertx = context.owner(); bootstrap.resolver(vertx.nettyAddressResolverGroup()); bootstrap.handler(new ChannelInitializer<Channel>() { @Override protected void initChannel(Channel ch) { initSSL(peerAddress, serverName, ch, channelHandler); } }); ChannelFuture fut = bootstrap.connect(vertx.transport().convert(remoteAddress, false)); fut.addListener(res -> { if (res.isSuccess()) { connected(fut.channel(), channelHandler); } else { channelHandler.handle(io.vertx.core.Future.failedFuture(res.cause())); } }); }
bootstrap.channelFactory(vertx.transport().serverChannelFactory(socketAddress.path() != null)); if (socketAddress.path() != null) { java.net.SocketAddress converted = vertx.transport().convert(socketAddress, true); ChannelFuture future = bootstrap.bind(converted); future.addListener(f -> {
java.net.SocketAddress targetAddress = vertx.transport().convert(remoteAddress, false);