From: Javier None Date: 2007-05-25T05:02:49+09:00 Subject: sending data, no strings via socket I'm trying to send data like typedef struct{ u_int32_t type; u_int8_t len; u_int8_t * buf; } over a tcp socket using ruby. Anything I push over the socket comes out the other end as a string.. in Ruby.. data = 10 socket = TCPSocket.new(home,port) socket.write(data) on the other end I get receieved byte dump 0000: 31 30 10 which is the ascii for 10. How can I tell Ruby to send the 0x10? even if I write data = 0x10 on the other side I get: 0000: 31 36 16 Which again, is the ascii getting send, not the data. thanks for any help. -- Posted via http://www.ruby-forum.com/.