          :timeout))))
 
 (defn await-promise!
-  "Read the reply received from the server, waiting for timeout ms if the message hasn't yet been received. Raises an exception if the message hasn't been received within timeout ms"
+  "Read the reply received from the server, waiting for timeout ms if the
+  message hasn't yet been received. Raises an exception if the message hasn't
+  been received within timeout ms"
   ([prom] (await-promise prom REPLY-TIMEOUT))
   ([prom timeout]
      (.get (future @prom) timeout TimeUnit/MILLISECONDS)))


;; TODO: setup an error-handler in the case that we can't connect to the server
(defn connect
  "Connect to an running SC audio server. Either an external server if host and port are passed or an internal server
   in the case of no args."
  ([] (connect-internal))
  ([host port] (.run (Thread. #(connect-external host port)))))


    @status*))

(defn wait-sync
  "Wait until the audio server has completed all asynchronous commands
  currently in execution."
  [& [timeout]]
  (let [sync-id (rand-int 999999)
        reply-p (recv "/synced")
