def receive_multiple_transmissions(file=nil)
      # FIXME: The code which waits for incoming network packets seems to be very CPU intensive.
      # Perhaps there is a more elegant way to wait for incoming messages?
      #
      @listen = true
      segments = Array.new
      while @listen
        # Receive data and append the current data to our segments array, which will be returned.
        data = receive_transmission(@min_length)
        current_segments = interpret(data, file)
        if current_segments
          current_segments.each do |cs|
            segments << cs
          end
        end
      end
      segments << {:valid => false} unless segments
      return segments
    end
def receive_multiple_transmissions(file=nil)
      # FIXME: The code which waits for incoming network packets seems to be very CPU intensive.
      # Perhaps there is a more elegant way to wait for incoming messages?
      #
      @listen = true
      segments = Array.new
      while @listen
        # Receive data and append the current data to our segments array, which will be returned.
        data = receive_transmission(@min_length)
        current_segments = interpret(data, file)
        if current_segments
          current_segments.each do |cs|
            segments << cs
          end
        end
      end
      segments << {:valid => false} unless segments
      return segments
    end
Handles the reception of multiple incoming transmissions.
 Returns an array of interpreted message information hashes.

 === Parameters

 * <tt>file</tt> -- A boolean used to inform whether an incoming data fragment is part of a DICOM file reception or not.