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

Abstract Art on Acrylic Panels

coding headlines

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

OpenShift Online: a non-developer guide

Detailed Error Handling In Bash

Tutorial: Create an NFS-like Storage Server with GlusterFS on Ubuntu 12.10

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

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