O'Reilly logo

Sams Teach Yourself Ruby in 21 Days by Mark Slagell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sockets

Almost every desktop computer in existence now implements a protocol whereby numbered ports can be opened to the outside world. Most of the low-numbered ports have consistent assignments. For instance, port 80 is generally used to accept Web browser connections, and 25 and 110 are used for e-mail delivery and retrieval, respectively. Microsoft Windows does the bulk of its networking on ports 137, 138, and 139.

Note

On Unix, look at the /etc/services file for an extensive list of network services and the port numbers associated with them.

A port is useless until it is associated with a socket, since a port is hardly anything more than a number, and a socket is a real IO object. Sockets are the means by which your Ruby scripts talk to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required