mirror of https://github.com/grpc/grpc-java.git
Update the code example to use our own API
This commit is contained in:
parent
0b57f56bf0
commit
37b1a8c6d9
|
|
@ -77,7 +77,7 @@ In this example the service owner provides a certificate chain and private key t
|
||||||
|
|
||||||
```java
|
```java
|
||||||
// Load certificate chain and key for SSL server into a Netty SslContext
|
// Load certificate chain and key for SSL server into a Netty SslContext
|
||||||
SslContext sslContext = SslContext.newServerContext(certChainFile, privateKeyFile);
|
SslContext sslContext = GrpcSslContexts.forServer(certChainFile, privateKeyFile);
|
||||||
// Create a server, bound to port 443 and exposing a service implementation
|
// Create a server, bound to port 443 and exposing a service implementation
|
||||||
ServerImpl server = NettyServerBuilder.forPort(443)
|
ServerImpl server = NettyServerBuilder.forPort(443)
|
||||||
.sslContext(sslContext)
|
.sslContext(sslContext)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue