Hi,

From: "gabriele renzi" <surrender_it / rc1.vip.lng.yahoo.com>
>
> I need to write a value (it should be a Fixnum, but I'm not sure) over
> a TCPSocket.
> How can I write it in a typical "4 bytes, network byte order" style?
> 
> And what if I need to compose a byte and send it over the network?
> Is BitVector the only choice?

Array#pack is probably what you're looking for...
http://www.rubycentral.com/ref/ref_c_array.html#pack
(the table showing the template characters for pack is a
few pages up in that document... search for "Template
characters for Array#pack")



Hope this helps,

Bill