<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWConnectionGroup",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network17NWConnectionGroupC"
  },
  "title" : "NWConnectionGroup"
}
-->

# NWConnectionGroup

An object you use to communicate with a group of endpoints, such as an IP multicast group on a local network.

```
final class NWConnectionGroup
```

## Topics

### Establishing Group Connectivity

[`init(with:using:)`](/documentation/Network/NWConnectionGroup/init(with:using:))

Initializes a new connection group with a group identifier.

[`NWMulticastGroup`](/documentation/Network/NWMulticastGroup)

A descriptor for a group you use to join an IP multicast group on a local network.

[`NWGroupDescriptor`](/documentation/Network/NWGroupDescriptor)

A protocol that defines a group of endpoints with which you can communicate, such as a multicast group.

[`start(queue:)`](/documentation/Network/NWConnectionGroup/start(queue:))

Joins the group, registers to receive messages, and sets the queue on you handle group events.

### Sending and Receiving Group Messages

[`setReceiveHandler(maximumMessageSize:rejectOversizedMessages:handler:)`](/documentation/Network/NWConnectionGroup/setReceiveHandler(maximumMessageSize:rejectOversizedMessages:handler:))

Sets a handler that receives inbound messages from members of the group.

[`send(content:to:message:completion:)`](/documentation/Network/NWConnectionGroup/send(content:to:message:completion:))

Sends data to the entire group, or to a specific member of the group.

[`NWConnectionGroup.Message`](/documentation/Network/NWConnectionGroup/Message)

An object that represents a message that you send or receive within a group, and that contains protocol metadata and send properties.

### Managing Groups

[`stateUpdateHandler`](/documentation/Network/NWConnectionGroup/stateUpdateHandler)

A handler that receives connection group state updates.

[`NWConnectionGroup.State`](/documentation/Network/NWConnectionGroup/State-swift.enum)

States that indicate whether you can use a connection group to send and receive messages.

[`state`](/documentation/Network/NWConnectionGroup/state-swift.property)

The current state of the connection group.

[`cancel()`](/documentation/Network/NWConnectionGroup/cancel())

Cancels the connection group object and leaves the network group.

### Inspecting Groups

[`descriptor`](/documentation/Network/NWConnectionGroup/descriptor)

The descriptor of the group you use to initialize the connection group.

[`parameters`](/documentation/Network/NWConnectionGroup/parameters)

The parameters with which you initialize the connection group.

[`queue`](/documentation/Network/NWConnectionGroup/queue)

The queue on which you handle group events.



---

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)