@@ -32,12 +32,17 @@ fileprivate final class Echo_EchoGetCallBase: ClientCallUnaryBase<Echo_EchoReque
3232}
3333
3434internal protocol Echo_EchoExpandCall : ClientCallServerStreaming {
35- /// Call this to wait for a result. Blocking .
36- func receive ( ) throws -> Echo_EchoResponse ?
35+ /// Do not call this directly, call `receive()` in the protocol extension below instead .
36+ func _receive ( timeout : DispatchTime ) throws -> Echo_EchoResponse ?
3737 /// Call this to wait for a result. Nonblocking.
3838 func receive( completion: @escaping ( ResultOrRPCError < Echo_EchoResponse ? > ) -> Void ) throws
3939}
4040
41+ internal extension Echo_EchoExpandCall {
42+ /// Call this to wait for a result. Blocking.
43+ func receive( timeout: DispatchTime = . distantFuture) throws -> Echo_EchoResponse ? { return try self . _receive ( timeout: timeout) }
44+ }
45+
4146fileprivate final class Echo_EchoExpandCallBase : ClientCallServerStreamingBase < Echo_EchoRequest , Echo_EchoResponse > , Echo_EchoExpandCall {
4247 override class var method : String { return " /echo.Echo/Expand " }
4348}
@@ -49,15 +54,20 @@ class Echo_EchoExpandCallTestStub: ClientCallServerStreamingTestStub<Echo_EchoRe
4954internal protocol Echo_EchoCollectCall : ClientCallClientStreaming {
5055 /// Send a message to the stream. Nonblocking.
5156 func send( _ message: Echo_EchoRequest , completion: @escaping ( Error ? ) -> Void ) throws
52- /// Send a message to the stream and wait for the send operation to finish. Blocking .
53- func send ( _ message: Echo_EchoRequest ) throws
57+ /// Do not call this directly, call `send()` in the protocol extension below instead .
58+ func _send ( _ message: Echo_EchoRequest , timeout : DispatchTime ) throws
5459
5560 /// Call this to close the connection and wait for a response. Blocking.
5661 func closeAndReceive( ) throws -> Echo_EchoResponse
5762 /// Call this to close the connection and wait for a response. Nonblocking.
5863 func closeAndReceive( completion: @escaping ( ResultOrRPCError < Echo_EchoResponse > ) -> Void ) throws
5964}
6065
66+ internal extension Echo_EchoCollectCall {
67+ /// Send a message to the stream and wait for the send operation to finish. Blocking.
68+ func send( _ message: Echo_EchoRequest , timeout: DispatchTime = . distantFuture) throws { try self . _send ( message, timeout: timeout) }
69+ }
70+
6171fileprivate final class Echo_EchoCollectCallBase : ClientCallClientStreamingBase < Echo_EchoRequest , Echo_EchoResponse > , Echo_EchoCollectCall {
6272 override class var method : String { return " /echo.Echo/Collect " }
6373}
@@ -69,22 +79,32 @@ class Echo_EchoCollectCallTestStub: ClientCallClientStreamingTestStub<Echo_EchoR
6979}
7080
7181internal protocol Echo_EchoUpdateCall : ClientCallBidirectionalStreaming {
72- /// Call this to wait for a result. Blocking .
73- func receive ( ) throws -> Echo_EchoResponse ?
82+ /// Do not call this directly, call `receive()` in the protocol extension below instead .
83+ func _receive ( timeout : DispatchTime ) throws -> Echo_EchoResponse ?
7484 /// Call this to wait for a result. Nonblocking.
7585 func receive( completion: @escaping ( ResultOrRPCError < Echo_EchoResponse ? > ) -> Void ) throws
7686
7787 /// Send a message to the stream. Nonblocking.
7888 func send( _ message: Echo_EchoRequest , completion: @escaping ( Error ? ) -> Void ) throws
79- /// Send a message to the stream and wait for the send operation to finish. Blocking .
80- func send ( _ message: Echo_EchoRequest ) throws
89+ /// Do not call this directly, call `send()` in the protocol extension below instead .
90+ func _send ( _ message: Echo_EchoRequest , timeout : DispatchTime ) throws
8191
8292 /// Call this to close the sending connection. Blocking.
8393 func closeSend( ) throws
8494 /// Call this to close the sending connection. Nonblocking.
8595 func closeSend( completion: ( ( ) -> Void ) ? ) throws
8696}
8797
98+ internal extension Echo_EchoUpdateCall {
99+ /// Call this to wait for a result. Blocking.
100+ func receive( timeout: DispatchTime = . distantFuture) throws -> Echo_EchoResponse ? { return try self . _receive ( timeout: timeout) }
101+ }
102+
103+ internal extension Echo_EchoUpdateCall {
104+ /// Send a message to the stream and wait for the send operation to finish. Blocking.
105+ func send( _ message: Echo_EchoRequest , timeout: DispatchTime = . distantFuture) throws { try self . _send ( message, timeout: timeout) }
106+ }
107+
88108fileprivate final class Echo_EchoUpdateCallBase : ClientCallBidirectionalStreamingBase < Echo_EchoRequest , Echo_EchoResponse > , Echo_EchoUpdateCall {
89109 override class var method : String { return " /echo.Echo/Update " }
90110}
@@ -207,21 +227,26 @@ class Echo_EchoGetSessionTestStub: ServerSessionUnaryTestStub, Echo_EchoGetSessi
207227internal protocol Echo_EchoExpandSession : ServerSessionServerStreaming {
208228 /// Send a message to the stream. Nonblocking.
209229 func send( _ message: Echo_EchoResponse , completion: @escaping ( Error ? ) -> Void ) throws
210- /// Send a message to the stream and wait for the send operation to finish. Blocking .
211- func send ( _ message: Echo_EchoResponse ) throws
230+ /// Do not call this directly, call `send()` in the protocol extension below instead .
231+ func _send ( _ message: Echo_EchoResponse , timeout : DispatchTime ) throws
212232
213233 /// Close the connection and send the status. Non-blocking.
214234 /// You MUST call this method once you are done processing the request.
215235 func close( withStatus status: ServerStatus , completion: ( ( ) -> Void ) ? ) throws
216236}
217237
238+ internal extension Echo_EchoExpandSession {
239+ /// Send a message to the stream and wait for the send operation to finish. Blocking.
240+ func send( _ message: Echo_EchoResponse , timeout: DispatchTime = . distantFuture) throws { try self . _send ( message, timeout: timeout) }
241+ }
242+
218243fileprivate final class Echo_EchoExpandSessionBase : ServerSessionServerStreamingBase < Echo_EchoRequest , Echo_EchoResponse > , Echo_EchoExpandSession { }
219244
220245class Echo_EchoExpandSessionTestStub : ServerSessionServerStreamingTestStub < Echo_EchoResponse > , Echo_EchoExpandSession { }
221246
222247internal protocol Echo_EchoCollectSession : ServerSessionClientStreaming {
223- /// Call this to wait for a result. Blocking .
224- func receive ( ) throws -> Echo_EchoRequest ?
248+ /// Do not call this directly, call `receive()` in the protocol extension below instead .
249+ func _receive ( timeout : DispatchTime ) throws -> Echo_EchoRequest ?
225250 /// Call this to wait for a result. Nonblocking.
226251 func receive( completion: @escaping ( ResultOrRPCError < Echo_EchoRequest ? > ) -> Void ) throws
227252
@@ -234,26 +259,41 @@ internal protocol Echo_EchoCollectSession: ServerSessionClientStreaming {
234259 func sendErrorAndClose( status: ServerStatus , completion: ( ( ) -> Void ) ? ) throws
235260}
236261
262+ internal extension Echo_EchoCollectSession {
263+ /// Call this to wait for a result. Blocking.
264+ func receive( timeout: DispatchTime = . distantFuture) throws -> Echo_EchoRequest ? { return try self . _receive ( timeout: timeout) }
265+ }
266+
237267fileprivate final class Echo_EchoCollectSessionBase : ServerSessionClientStreamingBase < Echo_EchoRequest , Echo_EchoResponse > , Echo_EchoCollectSession { }
238268
239269class Echo_EchoCollectSessionTestStub : ServerSessionClientStreamingTestStub < Echo_EchoRequest , Echo_EchoResponse > , Echo_EchoCollectSession { }
240270
241271internal protocol Echo_EchoUpdateSession : ServerSessionBidirectionalStreaming {
242- /// Call this to wait for a result. Blocking .
243- func receive ( ) throws -> Echo_EchoRequest ?
272+ /// Do not call this directly, call `receive()` in the protocol extension below instead .
273+ func _receive ( timeout : DispatchTime ) throws -> Echo_EchoRequest ?
244274 /// Call this to wait for a result. Nonblocking.
245275 func receive( completion: @escaping ( ResultOrRPCError < Echo_EchoRequest ? > ) -> Void ) throws
246276
247277 /// Send a message to the stream. Nonblocking.
248278 func send( _ message: Echo_EchoResponse , completion: @escaping ( Error ? ) -> Void ) throws
249- /// Send a message to the stream and wait for the send operation to finish. Blocking .
250- func send ( _ message: Echo_EchoResponse ) throws
279+ /// Do not call this directly, call `send()` in the protocol extension below instead .
280+ func _send ( _ message: Echo_EchoResponse , timeout : DispatchTime ) throws
251281
252282 /// Close the connection and send the status. Non-blocking.
253283 /// You MUST call this method once you are done processing the request.
254284 func close( withStatus status: ServerStatus , completion: ( ( ) -> Void ) ? ) throws
255285}
256286
287+ internal extension Echo_EchoUpdateSession {
288+ /// Call this to wait for a result. Blocking.
289+ func receive( timeout: DispatchTime = . distantFuture) throws -> Echo_EchoRequest ? { return try self . _receive ( timeout: timeout) }
290+ }
291+
292+ internal extension Echo_EchoUpdateSession {
293+ /// Send a message to the stream and wait for the send operation to finish. Blocking.
294+ func send( _ message: Echo_EchoResponse , timeout: DispatchTime = . distantFuture) throws { try self . _send ( message, timeout: timeout) }
295+ }
296+
257297fileprivate final class Echo_EchoUpdateSessionBase : ServerSessionBidirectionalStreamingBase < Echo_EchoRequest , Echo_EchoResponse > , Echo_EchoUpdateSession { }
258298
259299class Echo_EchoUpdateSessionTestStub : ServerSessionBidirectionalStreamingTestStub < Echo_EchoRequest , Echo_EchoResponse > , Echo_EchoUpdateSession { }
0 commit comments