 
 (def server-url "ws://192.168.1.6:3034")
 (def new-msg-ch (chan))
+(def requests (atom {}))
 
-(defn send-msg! [msg]
-  (go
-    (>! new-msg-ch msg)))
+(defn send-msg! [msg & [handler]]
+  (let [uuid (get msg "id")]
+    (when handler
+      (swap! requests assoc uuid handler))
+    (go
+      (>! new-msg-ch msg))))
 
 (defn send-loop [server-ch]
   (go-loop []


(defn receive-msg! [server-ch]
  (go-loop []
    (when-let [msg (<! server-ch)]
      (println msg)
      (recur))))

(defn setup-connection []

    om/IWillMount
    (will-mount [_]
      (send-msg! {"id" (uuid)
                  "command" "list"} println))
    om/IRender
    (render [_]
      (html
