 
 (defn receive-msg! [server-ch]
   (go-loop []
-    (when-let [msg (<! server-ch)]
-      (println msg)
+    (let [{:keys [message]} (<! server-ch)
+          uuid (get message "in-response-to")
+          data (get message "data")]
+      (when-let [handler (get @requests uuid)]
+        (handler data)
+        (swap! requests dissoc uuid))
       (recur))))
 
 (defn setup-connection []


(def server-url "ws://192.168.1.6:3034")
(def new-msg-ch (chan))

(defn send-msg! [msg]
  (go
    (>! new-msg-ch msg)))

(defn send-loop [server-ch]
  (go-loop []

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