 ;;;; Sending and receiving
 
 (defn new-client
+  "Create a new cometd client object."
   ([]   (new-client "compojure"))
   ([id] (new-client *cometd* id))
   ([servlet id]

  (.. servlet (getBayeux)
              (getChannel channel true)))

(defn publish
  "Publish a message to a channel."
  ([channel message]

  ([client channel message]
    (publish *cometd* client channel message))
  ([servlet client channel message]
    (.publish (get-channel servlet channel)
              client
              (json-generator message)
              nil)))

(defn subscribe
  "Subscribe to a channel."
