What is socket? Socket is a logical communication terminal.

Source: Internet
Author: User

ClickArticleFrom: Nokia Developer Forum http://www.developer.nokia.com/community/wiki/use socket_api

I feel concise, so I can repost it!

●What is socket?
So what is socket? The classic definition of socket Implementation of Berkeley UNIX is "socket is a communication terminal ".

●So what exactly does it mean?
A socket represents a communication 'channel' logical terminal. In fact, socket is a set of physical network addresses and logical port numbers, which can be used to transmit data to a socket with the same definition as another location.
Because the socket is distinguished/identified by the machine address and port number, each socket is uniquely identified on a specific computer network. This makes the applicationProgramYou can locate the socket in another position on the network.
Note: For two sockets on the same machine, they are completely capable of communication with each other. In this case, the two sockets have the same host address, but they have different port numbers.
The combination of host addresses and port numbers varies with different protocols. In the typical application of socket, network communication uses the IP (Internet Protocol) protocol, but in fact socket supports many other protocols. This information will be mentioned later.
●As we will see, no matter what communication protocol (Transport Layer) we choose, we can use the same mature Socket API for communication.

●The typical application of socket is to enable communication between two logical endpoints on the TCP/IP computer network. The most famous computer network that uses TCP/IP, of course, is internet. The implementation of most socket systems is limited to TCP/IP network communication.

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.