I also started to figure out about sockets. I would suggest reading this introducing tutorial in C:
      http://www.cs.rpi.edu/courses/sysprog/sockets/sock.html
It describes exactly what is needed for sockets. Also reading the doc could be helpfull but take care because some of the samples are broken:http://www.ruby-doc.org/stdlib/libdoc/socket/rdoc/index.html


-- 
kazaam <kazaam / oleco.net>