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

后端 未结 5 446
栀梦
栀梦 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条回答
  •  闹比i
    闹比i (楼主)
    2021-02-02 03:23

    HTTP is just a layer above TCP, so it's also "socket-based". I would use HTTP, for example because there is HTTPS for the cases when secure communication is needed. Another advantage of HTTP(S) over a custom-made TCP-protocol is that firewalls usually have a pinhole for the TCP port it uses (HTTP: 80, HTTPS: 443).

提交回复
热议问题