<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/nw_ethernet_channel_set_receive_handler(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@F@nw_ethernet_channel_set_receive_handler"
  },
  "title" : "nw_ethernet_channel_set_receive_handler(_:_:)"
}
-->

# nw_ethernet_channel_set_receive_handler(_:_:)

Sets a handler to receive inbound Ethernet frames.

```
func nw_ethernet_channel_set_receive_handler(_ ethernet_channel: nw_ethernet_channel_t, _ handler: nw_ethernet_channel_receive_handler_t?)
```

## Discussion

The receive handler only needs to be set once, and will be invoked for each received Ethernet frame.

---

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)