remoteEndpoint
An Nwendpoint object containing information about the intended remote endpoint of the flow.
Declaration
var remoteEndpoint: NWEndpoint { get }Discussion
If the flow’s corresponding socket was created using one of the high-level networking APIs such as URLSession or NSURLConnection, then the hostname property of the remoteEndpoint object contains the DNS name of the remote host. If the flow’s corresponding socket was created using the sockets API directly, then the hostname property of the remoteEndpoint object contains the IP address of the remote host.