Contents

CFSocketCopyPeerAddress(_:)

Returns the remote address to which a CFSocket object is connected.

Declaration

func CFSocketCopyPeerAddress(_ s: CFSocket!) -> CFData!

Parameters

  • s:

    The CFSocket object to examine.

Return Value

The remote address, stored as a struct sockaddr appropriate for the protocol family (struct sockaddr_in or struct sockaddr_in6, for example) in a CFData object, to which s is connected. Ownership follows the The Create Rule.

See Also

Configuring Sockets