iOS client-server app: HTTP or TCP/IP?

后端 未结 5 453
栀梦
栀梦 2021-02-02 02:48

I am about to start designing/developing a client-server iOS app. I am leaning towards using HTTP requests to get/post data from/to a server, but want to make sure this is the r

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-02 03:15

    HTTP requires sending several dozen bytes of required HTTP header info. Raw sockets can potentially be a pinch more efficient by leaving those header bytes off. But in actuality, after all the hardware buffering and packetizing thru multiple network hops, the difference may not be measurable.

    HTTP is less likely to be blocked by whoever is providing upstream net access than J random port number.

提交回复
热议问题