def receive(type, msg)
        if type == :stdout
          @unpacker ||= MessagePack::Unpacker.new
          @unpacker.feed_each(msg) do |decoded|
            inmate_type, inmate_value = decoded
            case inmate_type.to_s
            when 'yield'
              @yield_block.call(*inmate_value) if @yield_block
            when 'return'
              @return_value = inmate_value
            when 'raise'
              raise(*raise_args(inmate_value))
            when 'stdout'
              @stdout.write(inmate_value)
            end
          end
        elsif type == :stderr
          @stderr.write(msg)
        end
      end
Decodes a message from an inmate via docker.