The difference between Http, Socket, and TCP

Source: Internet
Author: User

Essential differences
    • IP: Network layer protocol;
    • TCP and UDP: Transport layer protocol;
    • HTTP: Application layer protocol;
    • SOCKET: Not an API for protocol, TCP/IP networking.
TCP/IP stands for Transmission Control Protocol/Internet Protocol, which refers to a series of protocol sets.TCP and UDP are HTTP,FTP, The Transport layer protocol used by protocols such as SMTP .  TCP and UDP use the IP protocol to transfer packets from one network to another network. Think of IP as a highway that allows other protocols to travel and find the exits of other computers. TCP and UDP are "trucks" on highways, and the goods they carry are agreements such as http,ftp. HTTP is the protocol that leverages TCP to transfer information between two computers (usually Web servers and clients)。       The client initiates an HTTP request to the Web server using a Web browser, and the Web server sends the requested information to the client. The Socket interface is a TCP/IP network Api,socket interface that defines many functions or routines for developing applications on TCP/IP networks.
  • http: Hypertext Transfer Protocol, which is based on "T "Application Layer" protocol >CP/IP t CP/IP protocol is a "Transport layer" protocol that mainly addresses how data is transmitted over a network, and HTTP is an application-layer protocol that mainly addresses how to package data session/cookie technology to resolve this issue.
  • Socket:socket is not a protocol category, but a calling interface (API),socket is the "TCP/IP" protocol encapsulation , by calling the socket, To use the TCP/IP protocol. The socket connection is a "long connection", in theory the client and server side will not actively disconnect this connection once the connection is established.


From for notes (Wiz)

The difference between Http, Socket, and TCP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.