Nikhil Marathe committed ce1059b

Separated query and read. Fixed indentation

Comments (0)

Files changed (1)

 (define (make-inline-command command)
   (letex ((fname (sym command)) (cmd command))
-        (define (fname r)
-          (letn ( (args-as-strings (map (fn (x) (string x)) (args)))
-                  (command-string (join (cons (upper-case cmd) args-as-strings) " ")) )
-              (:query r (append command-string redis:CRLF))))))
+    (define (fname r)
+      (letn ( (args-as-strings (map (fn (x) (string x)) (args)))
+              (command-string (join (cons (upper-case cmd) args-as-strings) " ")) )
+          (postprocess cmd (:query r (append command-string redis:CRLF)))))))
 (context MAIN)
   (:quit r)
   (net-close (r 1) true))
+; Simply sends a string to the server
+; And attempts to handle the reply
 (define (redis:query r command-str)
   (net-send (r 1) (append command-str redis:CRLF))
+  (redis:read r))
+; Separated from :query, so that bulk reply
+; handlers can call it multiple times in case
+; one read isn't enough.
+(define (redis:read r)
   (net-receive (r 1) buf redis:BUFSIZE)
   (write-buffer (r 2) buf)
   (:handle-reply r))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.