I have connected a PC (Windows2000) to a camera controller and I want to get image data from the controller. Two ports are used for this. Port 8500 is for text commands and text replies. Port 8501 is used for image data. When I request image data it streams to the PC via ethernet (8501) in bitmap format. I have no problem with the text commands and replies but catching the binary data confuses me. I would like to get the data in an array and then write it to a bitmap file. Getting it into an array at this point has me stuck. #################################### require 'socket' ip_address = "xxx.xxx.xxx.xxx" text_port = 8500 comm_io = TCPSocket.new(ip_address,text_port) # for CCD controller text image_port = 8501 image_io = TCPSocket.new(ip_address,image_port) # for binarydata outmsg = 'my_command'.upcase + "\r" comm_io.print outmsg inmsg = comm_io.gets.chomp.split(/,/) #################################### Any help appreciated. Harry