     argv = [] # Received arguments
 
     # Process the currently available input, returns remaining input.
-    process = (stream, input)->
+    process = (context, input)->
       if argc
         # We're here because we're waiting for argc arguments to arrive
         # before we can execute the next requet.

    last = null
    # Queue next command to execute (since we're pipelining, we wait for
    # the previous command to complete and send its output first).
    queue = (stream, argv)->
      command = {}
      # Invoke this command.
      command.invoke = ->
        if fn = commands[argv[0]]
          console.log "Executing #{argv.join(" ")}" if debug
          argv[0] = command.reply
          fn.apply {}, argv
        else
          command.reply ERROR, "Unknown command #{argv[0]}"
      # Send a reply back to the client and if there's another command
      # in the queue, invoke it next.
      command.reply = (type, value)->
        respond stream, type, value
        last = command.next if last == command
        # Invoke next command in queue.
        if command.next

            console.log "Expecting argument of size #{argl}" if debug
            return ""
          if argl
            return process(context, input)
          else
            throw new Error("Expecting $<argc>CRLF") if input.length > 0 && input[0] != "$"
      else
