Socket syntax and related
The socket is for HTTP, TCP/IP, send/receive ..... And so on the encapsulation of the underlying network protocol, the socket is an implementation of the "Open-write/read-close" mode.
Socket implementation send data (send), receive data (receive)
Socket concept
The socket is essentially a network between 2 computers, set up a channel, two computers through this channel to achieve the transmission of data. We know that network communication is based on the Ip+port can be targeted to the specific machine specific services, the operating system has 0-65535 ports, each port can be independent of external services, if a company than a computer, the company's switchboard number is equivalent to the IP address, Each employee's extension number is equivalent to the port, you want to find someone in the company, you must first call the switchboard, and then ext.
The establishment of a socket must have at least 2 end, a server, a client, the service side passively wait and receive requests, the client initiates the request, after the connection is established, the two sides can send data to each other.
IP Plus port number is required for network traffic.
Socket Families (Address cluster): Describes the protocol type, which refers to TCP/IP
Http://www.cnblogs.com/alex3714/articles/5227251.html
8699198
Python Network programming socket