Contents

CFHostCreateWithName(_:_:)

Uses a name to create an instance of a host object.

Declaration

func CFHostCreateWithName(_ allocator: CFAllocator?, _ hostname: CFString) -> Unmanaged<CFHost>

Parameters

  • hostname:

    A string representing the name of the host. This value must not be NULL.

Return Value

A valid CFHostRef object that can be resolved, or NULL if the host could not be created. Ownership follows the The Create Rule.

Discussion

Call CFHostStartInfoResolution(_:_:_:) to resolve the object’s addresses and reachability information.

Special Considerations

This function is thread safe.

See Also

Hosts