标签:
Data used to deliver through net should be encapsulated.
General encapsulation include 4 layer of header, in UNIX, it‘s:
It means the application that need to send data shall encapsulate/uncapsulate the 1st Layer. The H2H layer is about the data correctness. The Internet Layer has info to do internet routing between gateways, to get the packages sent to the destination. NALayer includes info about the data‘s transmission type.
However, a full-blown model is: (needtoremember)
So much work need to be done before a package can be sent.
Sockets:
File descriptor is an integer associated with an open file. In UNIX systems, this file can be a FIFO, a pipe, a terminal, a real-on-the-disk file...
Port Numbers along with the IP address is used in network. As IP is used in internet routing, port no. is used in TCP/UDP sockets. It‘s a 16 bit- totally 65536 sized.
Some famous port numbers are given in this site.
标签:
原文地址:http://www.cnblogs.com/sansna/p/5421315.html