---
title: "handleOutput(framer:message:messageLength:isComplete:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/nwprotocolframerimplementation/handleoutput(framer:message:messagelength:iscomplete:)"
---

# handleOutput(framer:message:messageLength:isComplete:)

Notifies your protocol about a new outbound message.

## Declaration

```swift
func handleOutput(framer: NWProtocolFramer.Instance, message: NWProtocolFramer.Message, messageLength: Int, isComplete: Bool)
```

## Parameters

- `framer`: The framer instance associated with the connection.
- `message`: The framer message passed by the application.
- `messageLength`: The length of the message content being sent.
- `isComplete`: 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 writeOutput(data:) or writeOutputNoCopy(length:) before returning from the output handler. If you do not write a message, the application message will be discarded.

## See Also

### Handling Data

- [handleInput(framer:)](network/nwprotocolframerimplementation/handleinput(framer:).md)
