Alexander Dinu  committed 7bf7a99

some todos added

  • Participants
  • Parent commits 0d0a8ba
  • Branches default

Comments (0)

Files changed (1)

       (parameterize ([current-custodian cust])
         (let-values ([(in out) (tcp-connect hostname port)])
           (make-connection in out cust)))))
   (define current-connection (void))
   (define (redis-connect! . args)
   (define (redis-query . commands)
     (let ([out (connection-out (current-connection))]
           [in (connection-in (current-connection))])
+      ;; TODO: validation of command name and number of arguments
       (fprintf out (format "*~a\r\n" (length commands)))
       (fprintf out (foldr string-append ""
                           (map (lambda (command)
   (define (read-reply in)
     (match (read-bytes 1 in)
            [#"+" (read-line in 'return-linefeed)]
-           [#"-" (read-line in 'return-linefeed)]
+           [#"-" (read-line in 'return-linefeed)] ;; TODO: implement exceptions
            [#":" (string->number (read-line in 'return-linefeed))]
            [#"$" (read-bulk-reply in)]
            [#"*" (read-multi-bulk-reply in)]