Jesse Storimer's Blog Archives tagged Sockets

Screencast: Ruby's Socket API From the Outside In - October 24, 2012

One of the reasons I love Ruby is the elegant DSLs and wrappers it provides around complex constructs. Socket programing is no exception. In fact, this becomes really apparent when you look at socket programming. The low-level details and intricacies of the Socket APIs can be complex, but Ruby provides nice high level wrappers on top of the hard stuff. ...
Read more

Screencast: Ruby's IO Buffering And You! - September 25, 2012

Where I show you the difference between write() and syswrite(), explain what happens when you set sync = true, and dive into the Rubinius source code to bring it all together. I've been delving into Ruby's IO system lately and finding out lots of neat things. So I decided to share a few. The whole thing is less than 10 ...
Read more

Passing Open Files Between Processes with UNIX Sockets - May 07, 2012

I want to share with you today a neat little technique I learned involving UNIX sockets. In the land of Unix everything is a file. This is faithfully mirrored in Ruby with the IO class. The IO class models any so-called files on a Unix system. This includes stuff like File, TCPSocket, UDPSocket, all of which are subclasses of IO. ...
Read more