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

# nw_framer_output_handler_t

A handler that notifies your protocol about a new outbound message.

## Declaration

```swift
typealias nw_framer_output_handler_t = (nw_framer_t, nw_framer_message_t, Int, Bool) -> Void
```

## Parameters

- `framer`: The framer instance associated with the connection.
- `message`: The framer message passed by the application.
- `message_length`: The length of the message content being sent.
- `is_complete`: A boolean indicating if this the last chunk of a message.

## Discussion

Discussion The output handler is your opportunity to encapsulate or encode a signle application message. You should write any output using nw_framer_write_output(_:_:_:), nw_framer_write_output_data(_:_:), or nw_framer_write_output_no_copy(_:_:) before returning from the output handler. If you do not write a message, the application message will be discarded.

## See Also

### Handling Output Data

- [nw_framer_set_output_handler(_:_:)](network/nw_framer_set_output_handler(_:_:).md)
- [nw_framer_parse_output(_:_:_:_:_:)](network/nw_framer_parse_output(_:_:_:_:_:).md)
- [nw_framer_parse_completion_t](network/nw_framer_parse_completion_t.md)
- [nw_framer_write_output(_:_:_:)](network/nw_framer_write_output(_:_:_:).md)
- [nw_framer_write_output_data(_:_:)](network/nw_framer_write_output_data(_:_:).md)
- [nw_framer_write_output_no_copy(_:_:)](network/nw_framer_write_output_no_copy(_:_:).md)
- [nw_framer_pass_through_output(_:)](network/nw_framer_pass_through_output(_:).md)
