receive(atLeast:atMost:)
Receive data from a connection
Declaration
func receive(atLeast: Int = 1, atMost: Int) async throws -> ApplicationProtocol.Message<Data>Parameters
- atLeast:
The minimum length to receive from the connection, until the content is complete.
- atMost:
The maximum length to receive from the connection in a single completion.
Discussion
This may be called before the connection is ready, in which case the receive request will be enqueued until the connection is ready.