Instance Property
remoteAddress
The peer’s endpoint, as reported by getpeername(2).
var remoteAddress: SocketAddress? { get }
Discussion
On an accepted server-side socket this is the connecting client; on a connected client socket this is the server. Returns nil if the syscall fails (e.g. the socket is not connected, or has been closed).