Contents

CFNetServiceCreateCopy(_:_:)

Creates a copy of a CFNetService object.

Declaration

func CFNetServiceCreateCopy(_ alloc: CFAllocator?, _ service: CFNetService) -> Unmanaged<CFNetService>

Parameters

  • alloc:

    The allocator to use to allocate memory for the new object. Pass NULL or Kcfallocatordefault to use the current default allocator.

  • service:

    CFNetServiceRef to be copied; cannot be NULL. If service is not a valid CFNetServiceRef, the behavior of this function is undefined.

Return Value

Copy of service, including all previously resolved data, or NULL if service could not be copied. Ownership follows the The Create Rule.

Discussion

This function creates a copy of the CFNetService specified by service.

Special Considerations

This function is thread safe.

See Also

Network Services