Contents

CFNetServiceGetPortNumber(_:)

This function gets the port number from a CFNetService.

Declaration

func CFNetServiceGetPortNumber(_ theService: CFNetService) -> Int32

Parameters

  • theService:

    The CFNetService whose protocol-specific information is to be obtained; cannot be NULL. Note that in order to get protocol-specific information, you must resolve theService by calling Cfnetserviceresolve or Cfnetserviceresolvewithtimeout(_:_:_:) before calling this function.

Return Value

The port number of the service.

See Also

Network Services