            [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))))


(defn- trim [#^String s] (.trim s))
(defn- parse-int [#^String s] (Integer/parseInt s))
(defn- char-array [len] (make-array Character/TYPE len))

(defn connect-to-server
  "Create a Socket connected to server"
