public final class TcpConnector
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Single<io.netty.channel.Channel> |
connect(java.net.SocketAddress localAddress,
java.lang.Object resolvedRemoteAddress,
ReadOnlyTcpClientConfig config,
boolean autoRead,
ExecutionContext executionContext)
Connects to the passed
resolvedRemoteAddress address, resolving the address, if required. |
public static Single<io.netty.channel.Channel> connect(@Nullable java.net.SocketAddress localAddress, java.lang.Object resolvedRemoteAddress, ReadOnlyTcpClientConfig config, boolean autoRead, ExecutionContext executionContext)
resolvedRemoteAddress
address, resolving the address, if required.localAddress
- The local address to bind to, or null
.resolvedRemoteAddress
- The address to connect to. This address should already be resolved at this point.config
- The ReadOnlyTcpClientConfig
to use while connecting.autoRead
- if true
auto read will be enabled for new Channel
s.executionContext
- The ExecutionContext
to use for the returned NettyConnection
.Single
that completes with a new Channel
when connected.