Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A wrapper that has the servlet for cometd2.
JavaScript Clojure
branch: master

This branch is 4 commits ahead, 1 commit behind mrh0057:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
functional-tests
src/ring/adapter
test/ring/adapter
.gitignore
README.md
project.clj

README.md

ring-cometd2-adapter

An ring adpater that includes the comet2d servlet.

Usage

Availabel on clojure jars. For use with lein.

 [net.matthoyt/ring-cometd2-adapter "0.1.1-SNAPSHOT"]

Publishing a message on a channel:

 (publish "channel/id" data)
 (publish "channel/id" data from-channel)

Defining services

 (defservices my-services
   ("service-name" "mychannel/*" handle))

Starting the server

 (run-jetty app
            {:port 8080 :servlets
             [(create-cometd-servlet)
              (create-bayeux-servlet my-services)]})

Adding a listener to see when a client session ends.

 (client-remove-listener client-session
                         (fn [session timeout]))

License

Jetty 7 adapter code: https://github.com/jalpedersen/ring-jetty7-adapter

Servlet Implementation: https://github.com/maxweber/hello-cometd

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.