Contents

receive(as:)

Receive data from a connection as a fixed width integer.

Declaration

func receive<Value>(as type: Value.Type) async throws -> ApplicationProtocol.Message<Value> where Value : NetworkFixedWidthInteger

Parameters

  • type:

    The type to use when interpreting the bytes.

Discussion

This may be called before the connection is ready, in which case the receive request will be enqueued until the connection is ready.