Contents

nw_content_context_t

A representation of a message to send or receive, containing protocol metadata and send properties.

Declaration

typealias nw_content_context_t = any OS_nw_content_context

Discussion

For sending, you should use NW_CONNECTION_DEFAULT_MESSAGE_CONTEXT unless there is a reason to override some values.

You can pass NW_CONNECTION_FINAL_MESSAGE_CONTEXT to mark the final message in a connection. Once this context is used for sending, and the send is marked as complete, no more data can be sent on the connection.

If you are using a protocol that expects message content, like WebSocket or a custom framer, create a custom context and set metadata using nw_content_context_set_metadata_for_protocol(_:_:).

Topics

Creating Custom Send Contexts

Inspecting Receive Contexts

See Also

Data Types