send(content:to:message:completion:)
Sends data to the entire group, or to a specific member of the group.
Declaration
@preconcurrency final func send(content: Data?, to: NWEndpoint? = nil, message: NWConnectionGroup.Message = .default, completion: @escaping (NWError?) -> Void)Parameters
- content:
The data to send.
- to:
An optional endpoint that specifies a member of the group that receives the data. If the endpoint is
nil, the data will be sent to the entire group. - message:
The metadata that defines how the message is sent.
- completion:
A completion that notifies you when the connection group has processed and sent the data.