# File lib/stomp_server/protocols/stomp.rb, line 50
  def process_frame(frame)
    cmd = frame.command.downcase.to_sym
    raise "Unhandled frame: #{cmd}" unless VALID_COMMANDS.include?(cmd)
    raise "Not connected" if !@connected && cmd != :connect

    # I really like this code, but my needs are a little trickier
    # 

    if trans = frame.headers['transaction']
      handle_transaction(frame, trans, cmd)
    else
      cmd = :sendmsg if cmd == :send
      send(cmd, frame) 
    end
    
    send_receipt(frame.headers['receipt']) if frame.headers['receipt']
  end