Librenix  
(Show all Perl articles . . .
)  
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Tutorial: Perl network programming with IO::Socket

Up
vote
Down

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.]
 read more | mail this link | score:4446 | -Ray, May 8, 2003 (Updated: April 26, 2011)
More Programming articles...

Buy Abstract Art Canvas Prints

Selected articles

Testing the Digital Ocean $5 Cloud Servers with an MMORPG

Space Tyrant: A threaded C game project: First Code

The Network Computer: An opportunity for Linux

Download: Linux 3D Client for Starship Traders

Beneficial Computer Viruses

The life cycle of a programmer

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin