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:4673 | -Ray, May 8, 2003 (Updated: April 26, 2011)
More Programming articles...

Abstract Art by Ray Yeargin

coding headlines

No Starch Press has published my Perl One-Liners book!

Introduction to Perl one-liners

Tutorial: Install SVN, Configure multi-protocol access (Ubuntu 11.10)

bash scripting: Looping through a list

perl1line.txt: A handy Perl script collection

Perl One-Liners Explained: Handy Regular Expressions

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

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