<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/nw_framer_output_handler_t",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@T@nw_framer_output_handler_t"
  },
  "title" : "nw_framer_output_handler_t"
}
-->

# nw_framer_output_handler_t

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

```
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

The output handler is your opportunity to encapsulate or encode a signle application message. You should write any output using [`nw_framer_write_output(_:_:_:)`](/documentation/Network/nw_framer_write_output(_:_:_:)), [`nw_framer_write_output_data(_:_:)`](/documentation/Network/nw_framer_write_output_data(_:_:)), or [`nw_framer_write_output_no_copy(_:_:)`](/documentation/Network/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)