 vote
 |
|
A fine introduction to network programming.
Every packet on the internet carries its own source and destination addresses. The source address is necessary, but not sufficient, to associate a packet with a TCP stream. It is not sufficient because there may be more than one simultaneous TCP connection between a pair of hosts. For example, each window that a web browser opens on a web server creates a separate TCP connection from that client to that server.
To accommodate this, TCP has a concept of ports. A TCP port is a 16-bit number. A TCP connection is made from a particular port at one IP address to a particular port at another IP address. Thus, every TCP connection that does, or could, exist on the internet is uniquely identified by a 4-tuple
address1, port1, address2, port2 [Update June 26, 2005: Related: Librenix is now featuring a C language multithreaded network socket programming game server project for Linux called Space Tyrant. As of June 26, there have been four code releases and the game is already playable from telnet.]
| | |
| |
|
|