NWConnection.ContentContext
An object that represents a message to send or receive, containing protocol metadata and send properties.
Declaration
class ContentContextOverview
For sending, you should use defaultMessage unless there is a reason to override some values.
You can pass finalMessage 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 protocolMetadata.
Topics
Using Constant Send Contexts
Creating Custom Send Contexts
init(identifier:expiration:priority:isFinal:antecedent:metadata:)identifierprotocolMetadataNWProtocolMetadataantecedentexpirationMillisecondsrelativePriority