1 Reply
      Latest reply on Feb 14, 2017 3:13 AM by eskimo
      ptank Level 1 Level 1 (0 points)



        Our used case is we provide Video SDKs to developers. The video SDK uses uses SIP (rfc3661) for signaling. At present, we use BSD sockets for SIP signaling and, we do not pair sockets with any `CFReadStreamRef` nor we set any property. In iOS 10, we noticed, Apple has introduced new stream type `kCFStreamNetworkServiceTypeCallSignaling`.


        My question is, should we pair our SIP signaling sockets with a CFReadStreamRef and set  kCFStreamNetworkServiceTypeCallSignaling property on it ? If Yes, what benefits will it give? Please let us know your recommendtations.



        Thank you,


        Piyush Tank

        • Re: iOS 10 and kCFStreamNetworkServiceTypeCallSignaling
          eskimo Apple Staff Apple Staff (13,325 points)

          For a while now we’ve had a CFSocketStream API (kCFStreamNetworkServiceType) for setting network quality of service (QoS).  In iOS 10 we finally added a BSD Sockets-level equivalent.  Check out the SO_NET_SERVICE_TYPE socket option and its related values in <sys/socket.h>.  You can also find more info on this in WWDC 2016 Session 714 Networking for the Modern Internet.

          There’s an obvious mapping from the former to the latter.  In the case of kCFStreamNetworkServiceTypeCallSignaling, that’s mapped to NET_SERVICE_TYPE_SIG.  And the header comments for NET_SERVICE_TYPE_SIG explain its expected QoS parameters.

          … should we pair our SIP signaling sockets with a CFReadStreamRefand set kCFStreamNetworkServiceTypeCallSignaling property on it ?

          You definitely should not do that (in fact, you should never do that!).  If you’re working at the BSD Sockets level, use SO_NET_SERVICE_TYPE.

          If Yes, what benefits will it give?

          See the header comments that I referenced above.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"