<!--
{
  "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_start_handler_t",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@T@nw_framer_start_handler_t"
  },
  "title" : "nw_framer_start_handler_t"
}
-->

# nw_framer_start_handler_t

A handler that represents the entry point into your custom protocol.

```
typealias nw_framer_start_handler_t = (nw_framer_t) -> nw_framer_start_result_t
```

## Return Value

Return a start result indicating if the connection should become ready immediately, or wait for you protocol to perform a handshake.

## Discussion

Within your start handler, you should register all other callbacks for your custom protocol, particularly [`nw_framer_set_output_handler(_:_:)`](/documentation/Network/nw_framer_set_output_handler(_:_:)) and [`nw_framer_set_input_handler(_:_:)`](/documentation/Network/nw_framer_set_input_handler(_:_:)).

Any state that you need to be associated with your protocol as customizable options can be captured within the start block.

---

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)