|
@@ -205,7 +205,7 @@ logical cores on your system.
|
|
|
We also `wait` for the server to start before setting up a client.
|
|
We also `wait` for the server to start before setting up a client.
|
|
|
|
|
|
|
|
```swift
|
|
```swift
|
|
|
-let serverEventLoopGroup = GRPCNIO.makeEventLoopGroup(numberOfThreads: 1)
|
|
|
|
|
|
|
+let serverEventLoopGroup = PlatformSupport.makeEventLoopGroup(numberOfThreads: 1)
|
|
|
let configuration = Server.Configuration(
|
|
let configuration = Server.Configuration(
|
|
|
target: .hostAndPort(address, port),
|
|
target: .hostAndPort(address, port),
|
|
|
eventLoopGroup: serverEventLoopGroup,
|
|
eventLoopGroup: serverEventLoopGroup,
|
|
@@ -226,7 +226,7 @@ means to make gRPC calls via a generated client. Note that
|
|
|
`Echo_EchoServiceClient` is the client we generated from `echo.proto`.
|
|
`Echo_EchoServiceClient` is the client we generated from `echo.proto`.
|
|
|
|
|
|
|
|
```swift
|
|
```swift
|
|
|
-let clientEventLoopGroup = GRPCNIO.makeEventLoopGroup(loopCount: 1)
|
|
|
|
|
|
|
+let clientEventLoopGroup = PlatformSupport.makeEventLoopGroup(loopCount: 1)
|
|
|
let configuration = ClientConnection.Configuration(
|
|
let configuration = ClientConnection.Configuration(
|
|
|
target: .hostAndPort(host, port),
|
|
target: .hostAndPort(host, port),
|
|
|
eventLoopGroup: clientEventLoopGroup
|
|
eventLoopGroup: clientEventLoopGroup
|
|
@@ -421,7 +421,7 @@ gRPC Swift provides a helper method to provide the correct `EventLoopGroup`
|
|
|
based on the network preference:
|
|
based on the network preference:
|
|
|
|
|
|
|
|
```swift
|
|
```swift
|
|
|
-GRPCNIO.makeEventLoopGroup(loopCount:networkPreference:) -> EventLoopGroup
|
|
|
|
|
|
|
+PlatformSupport.makeEventLoopGroup(loopCount:networkPreference:) -> EventLoopGroup
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
Here `networkPreference` defaults to `.best`, which chooses the
|
|
Here `networkPreference` defaults to `.best`, which chooses the
|