From: Joel VanderWerf Date: 2006-02-02T01:01:53+09:00 Subject: Re: IO and non-strings Mark Volkmann wrote: ... > require 'socket' > > # Create socket. > host, port = 'localhost', 1919 > socket = TCPSocket.new(host, port) > > # Send request message. > binary_string = [19, 10, 8].pack('N*') > socket.puts binary_string You want to avoid using gets/puts with binary strings. Those functions are for text, and will detect/insert line ends. In fact, 10 is the same as a \n character, so that's probably where it's choking. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407