use of io.grpc.netty.ProtocolNegotiators.TlsNegotiator in project grpc-java by grpc.
the class ProtocolNegotiatorsTest method tls_host.
@Test
public void tls_host() throws SSLException {
SslContext ctx = GrpcSslContexts.forClient().build();
TlsNegotiator negotiator = (TlsNegotiator) ProtocolNegotiators.tls(ctx, "[::1]");
assertEquals("[::1]", negotiator.getHost());
assertEquals(-1, negotiator.getPort());
}
Aggregations