@@ -34,8 +34,8 @@ private import Synchronization
34
34
/// The following example demonstrates how to create and run a server.
35
35
///
36
36
/// ```swift
37
- /// // Create an transport
38
- /// let transport: any ServerTransport = ...
37
+ /// // Create a transport
38
+ /// let transport = SomeServerTransport()
39
39
///
40
40
/// // Create the 'Greeter' and 'Echo' services.
41
41
/// let greeter = GreeterService()
@@ -73,7 +73,8 @@ private import Synchronization
73
73
/// This allows the server to drain existing requests gracefully. To stop the server more abruptly
74
74
/// you can cancel the task running your server. If your application requires additional resources
75
75
/// that need their lifecycles managed you should consider using [Swift Service
76
- /// Lifecycle](https://github.com/swift-server/swift-service-lifecycle).
76
+ /// Lifecycle](https://github.com/swift-server/swift-service-lifecycle) and the
77
+ /// `GRPCServiceLifecycle` module provided by [gRPC Swift Extras](https://github.com/grpc/grpc-swift-extras).
77
78
public final class GRPCServer < Transport: ServerTransport > : Sendable {
78
79
typealias Stream = RPCStream < Transport . Inbound , Transport . Outbound >
79
80
@@ -136,7 +137,7 @@ public final class GRPCServer<Transport: ServerTransport>: Sendable {
136
137
}
137
138
}
138
139
139
- /// Creates a new server with no resources .
140
+ /// Creates a new server.
140
141
///
141
142
/// - Parameters:
142
143
/// - transport: The transport the server should listen on.
@@ -158,7 +159,7 @@ public final class GRPCServer<Transport: ServerTransport>: Sendable {
158
159
)
159
160
}
160
161
161
- /// Creates a new server with no resources .
162
+ /// Creates a new server.
162
163
///
163
164
/// - Parameters:
164
165
/// - transport: The transport the server should listen on.
@@ -182,7 +183,7 @@ public final class GRPCServer<Transport: ServerTransport>: Sendable {
182
183
self . init ( transport: transport, router: router)
183
184
}
184
185
185
- /// Creates a new server with no resources .
186
+ /// Creates a new server with a pre-configured router .
186
187
///
187
188
/// - Parameters:
188
189
/// - transport: The transport the server should listen on.
0 commit comments