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.