createUDPSession(_:)
Creates a new UDP session over the network associated with the command.
Declaration
func createUDPSession(_ endpoint: NWEndpoint) -> NWUDPSessionParameters
- endpoint:
The remote host and port of the session.
Return Value
A UDP session that will connect over the network associated with the command.
Discussion
The UDP session is started automatically. Use KVO to observe the session’s state property to be notified when the session is ready to send and receive UDP datagrams. For information about KVO see Key-Value Observing Programming Guide.