Search in sources :

Example 1 with ReadOnlyTcpClientConfig

use of io.servicetalk.tcp.netty.internal.ReadOnlyTcpClientConfig in project servicetalk by apple.

the class StreamingConnectionFactory method buildStreaming.

static <ResolvedAddress> Single<? extends NettyConnection<Object, Object>> buildStreaming(final HttpExecutionContext executionContext, final ResolvedAddress resolvedAddress, final ReadOnlyHttpClientConfig roConfig, final TransportObserver observer) {
    final ReadOnlyTcpClientConfig tcpConfig = withSslConfigPeerHost(resolvedAddress, roConfig.tcpConfig());
    final H1ProtocolConfig h1Config = roConfig.h1Config();
    assert h1Config != null;
    // We disable auto read so we can handle stuff in the ConnectionFilter before we accept any content.
    return TcpConnector.connect(null, resolvedAddress, tcpConfig, false, executionContext, (channel, connectionObserver) -> createConnection(channel, executionContext, h1Config, tcpConfig, new TcpClientChannelInitializer(tcpConfig, connectionObserver, roConfig.hasProxy()), connectionObserver), observer);
}
Also used : ReadOnlyTcpClientConfig(io.servicetalk.tcp.netty.internal.ReadOnlyTcpClientConfig) TcpClientChannelInitializer(io.servicetalk.tcp.netty.internal.TcpClientChannelInitializer)

Aggregations

ReadOnlyTcpClientConfig (io.servicetalk.tcp.netty.internal.ReadOnlyTcpClientConfig)1 TcpClientChannelInitializer (io.servicetalk.tcp.netty.internal.TcpClientChannelInitializer)1