---
title: nw_content_context_t
framework: network
role: symbol
role_heading: Type Alias
path: network/nw_content_context_t
---

# nw_content_context_t

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

## Declaration

```swift
typealias nw_content_context_t = any OS_nw_content_context
```

## Discussion

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

- [nw_content_context_create(_:)](network/nw_content_context_create(_:).md)
- [nw_content_context_set_metadata_for_protocol(_:_:)](network/nw_content_context_set_metadata_for_protocol(_:_:).md)
- [nw_protocol_metadata_t](network/nw_protocol_metadata_t.md)
- [nw_content_context_set_antecedent(_:_:)](network/nw_content_context_set_antecedent(_:_:).md)
- [nw_content_context_copy_antecedent(_:)](network/nw_content_context_copy_antecedent(_:).md)
- [nw_content_context_set_expiration_milliseconds(_:_:)](network/nw_content_context_set_expiration_milliseconds(_:_:).md)
- [nw_content_context_get_expiration_milliseconds(_:)](network/nw_content_context_get_expiration_milliseconds(_:).md)
- [nw_content_context_set_relative_priority(_:_:)](network/nw_content_context_set_relative_priority(_:_:).md)
- [nw_content_context_get_relative_priority(_:)](network/nw_content_context_get_relative_priority(_:).md)
- [nw_content_context_set_is_final(_:_:)](network/nw_content_context_set_is_final(_:_:).md)
- [nw_content_context_get_identifier(_:)](network/nw_content_context_get_identifier(_:).md)

### Inspecting Receive Contexts

- [nw_content_context_get_is_final(_:)](network/nw_content_context_get_is_final(_:).md)
- [nw_content_context_copy_protocol_metadata(_:_:)](network/nw_content_context_copy_protocol_metadata(_:_:).md)
- [nw_content_context_foreach_protocol_metadata(_:_:)](network/nw_content_context_foreach_protocol_metadata(_:_:).md)

## See Also

### Data Types

- [nw_advertise_descriptor_t](network/nw_advertise_descriptor_t.md)
- [nw_browse_descriptor_t](network/nw_browse_descriptor_t.md)
- [nw_browse_result_change_t](network/nw_browse_result_change_t.md)
- [nw_browse_result_enumerate_interface_t](network/nw_browse_result_enumerate_interface_t.md)
- [nw_browse_result_t](network/nw_browse_result_t.md)
- [nw_browser_browse_results_changed_handler_t](network/nw_browser_browse_results_changed_handler_t.md)
- [nw_browser_state_changed_handler_t](network/nw_browser_state_changed_handler_t.md)
- [nw_browser_t](network/nw_browser_t.md)
- [nw_connection_boolean_event_handler_t](network/nw_connection_boolean_event_handler_t.md)
- [nw_connection_group_new_connection_handler_t](network/nw_connection_group_new_connection_handler_t.md)
- [nw_connection_group_receive_handler_t](network/nw_connection_group_receive_handler_t.md)
- [nw_connection_group_send_completion_t](network/nw_connection_group_send_completion_t.md)
- [nw_connection_group_state_changed_handler_t](network/nw_connection_group_state_changed_handler_t.md)
- [nw_connection_group_t](network/nw_connection_group_t.md)
- [nw_connection_path_event_handler_t](network/nw_connection_path_event_handler_t.md)
