The output is IQ (quadrature) sampling. It's interleaved, so first byte is I, second Q and so on. The samples are unsigned bytes, so you subtract 127 from them to get their real ralue (lying between -127 and +127).
Send a command byte followed by a 32-bit big-endian int parameter.
# https://gist.github.com/simeonmiteff/3792676
SET_FREQUENCY = 0x01
SET_SAMPLERATE = 0x02
SET_GAINMODE = 0x03
SET_GAIN = 0x04
SET_FREQENCYCORRECTION = 0x05
e.g. socket.puts [command, parameter].pack('CL>')
in Ruby.