         return "[\(type)]\(host.map { "\($0):" } ?? "")\(port)"
     }
     
+    /// Returns the protocol family as defined in `man 2 socket` of this `SocketAddress`.
     public var protocolFamily: Int32 {
         switch self {
         case .v4(address: _, host: _):

            throw SocketAddressError.unsupported
        }
    }

}


        return .unixDomainSocket(address: addr)
    }

    /// Creates a new `SocketAddress` for the given host (which will be resolved) and port.
    ///
    /// - parameters:
    ///       - host: the hostname which should be resolved.
    ///       - port: the port itself
    /// - returns: the `SocketAddress` for the host / port pair.
    /// - throws: a `SocketAddressError.unknown` if we could not resolve the `host`, or `SocketAddressError.unsupported` if the address itself is not supported (yet).
    public static func newAddressResolving(host: String, port: Int32) throws -> SocketAddress {
        var info: UnsafeMutablePointer<addrinfo>?
        
        /* FIXME: this is blocking! */
        if getaddrinfo(host, String(port), nil, &info) != 0 {
            throw SocketAddressError.unknown(host: host, port: port)
        }
        
        defer {
