[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Socket.new question

e

1/6/2005 7:13:00 PM

> Lähettäjä: Markus Jais <markusjais@yahoo.de>
> Aihe: Socket.new question
>
> hello
>
> I can create a socket object like this:
>
> Socket.new(Socket::PF_INET, Socket::SOCK_STREAM, 0)
>
> but what exactly is the third parameter ??
> according to the Pickaxe this parameter is called "protocol".
>
> what can I specify as a third parameter instead of 0 and do I need this
> sometimes ??

It's to denote a particular protocol within the type. For
SOCK_STREAM there's no protocol (TCP), but you can see protocols(5)
in the man pages for info on the more arcane ones, if memory serves.

E