            [java.net Socket]))
 
 
+(defstruct server :host :port :db :timeout :socket)
+
+(def *server* (struct-map server
+                :host     "127.0.0.1"
+                :port     6379
+                :db       0
+                :timeout  5000
+                :socket   nil))
 
 (def *cr* 0x0d)
 (def *lf* 0x0a)

  (let [{:keys [host port timeout]} server
        socket (Socket. #^String host #^Integer port)]
    (doto socket
      (.setTcpNoDelay true)
      (.setKeepAlive true))))


;;
;; Reply dispatching
;;
(defn reply-type
  ([#^BufferedReader reader]
     (char (.read reader))))
