NetworkAddress

public struct NetworkAddress : Hashable

Wraps sockaddr and it’s derivetives into a convenient swift structure

  • Reference to a stored sockaddr

    Declaration

    Swift

    public var sockaddrRef: UnsafePointer<sockaddr> { get }
  • Initializes NetworkAddress with any sockaddr

    Declaration

    Swift

    public init(sockaddr: UnsafePointer<sockaddr>)

    Parameters

    sockaddr

    to initialize NetworkAddress with

  • Initializes NetworkAddress with any sockaddr_in

    Declaration

    Swift

    public init(sockaddr_in: UnsafePointer<sockaddr_in>)
  • is equal operator

    Declaration

    Swift

    public static func == (lhs: NetworkAddress, rhs: NetworkAddress) -> Bool