 
   (snd \"/foo\" 1 2.0 \"eggs\")"
   [path & args]
-  (when-not (connected?)
+  (when (disconnected?)
     (throw (Exception. "Unable to send messages to a disconnected server. Please boot or connect to a server.")))
   (apply server-snd path args))
 

  []
  @connection-info*)

(defn server-status
  "Returns a keyword representing the current status of the server.
  i.e. :disconnected, :connected or some connecting status."
  []
  (:status @connection-info*))

(defn connected?
  "Returns true if the server is currently connected"
  []
  (= :connected (server-status)))

(defn disconnected?
  "Returns true if the server is currently disconnected"
  []
  (= :disconnected (server-status)))

(defn internal-server?
  "Returns true if the server is internal"

  ([] (boot-external-server (+ (rand-int 50000) 2000)))
  ([port]
     (boot :external port)
     :booted-external-server))

(defn boot-server
  "Boot an internal server."
  []
  (boot :internal)
  :booted-internal-server)

(defn kill-server
  "Shutdown the running server"
  []
  (shutdown-server)
  :server-killed)

(defn external-server-log
  "Print the external server log."
