Switch branches/tags
jetty-project-8.0.0.M1 jetty-project-7.4.2.vTEST jetty-project-7.0.2.v20100331 jetty-project-7.0.2.RC0 jetty-project-7.0.0.RC3 jetty-project-7.0.0.M1 jetty-8.0.1.v20110908 jetty-8.0.0.v20110901 jetty-8.0.0.RC0 jetty-8.0.0.M3 jetty-8.0.0.M2 jetty-8.0.0.M1 jetty-8.0.0.M0 jetty-8-to-jetty-7-base-20101115-1 jetty-8-to-jetty-7-base-20101026-1 jetty-8-to-jetty-7-base-20100721-1 jetty-8-to-jetty-7-base-20100719-1 jetty-8-to-jetty-7-base-20100715-1 jetty-7.5.1.v20110908 jetty-7.5.0.v20110901 jetty-7.5.0.RC2 jetty-7.5.0.RC1 jetty-7.5.0.RC0 jetty-7.4.5.v20110725 jetty-7.4.4.v20110707 jetty-7.4.3.v20110701 jetty-7.4.3.v20110630 jetty-7.4.2.v20110526 jetty-7.4.1 jetty-7.4.1.v20110513 jetty-7.4.1.v20110512 jetty-7.4.0.v20110414 jetty-7.4.0.RC0 jetty-7.3.1.v20110307 jetty-7.3.1.v20110304 jetty-7.3.0.20110202 jetty-7.3.0.v20112401 jetty-7.3.0.v20110203 jetty-7.3.0.v20110202 jetty-7.2.2.v20101205 jetty-7.2.2.v20101203 jetty-7.2.2.v20101201 jetty-7.2.1.v20101111 jetty-7.2.0.v20101020 jetty-7.2.0.RC1 jetty-7.2.0.RC0 jetty-7.1.6.v20100715 jetty-7.1.5.v20100705 jetty-7.1.4.v20100610 jetty-7.1.4.v20100609 jetty-7.1.4.v20090609 jetty-7.1.3.v20100526 jetty-7.1.2.v20100523 jetty-7.1.2.v20100522 jetty-7.1.2.v20100521 jetty-7.1.1.v20100517 jetty-7.1.0.v20100505 jetty-7.1.0.RC1 jetty-7.1.0.RC0 jetty-7.0.2.v20100331 jetty-7.0.2.RC0 jetty-7.0.1.v20091125 jetty-7.0.1.v20091123 jetty-7.0.1.v20091122 jetty-7.0.1.v20091117 jetty-7.0.1.v20091116 jetty-7.0.0.v20091005 jetty-7.0.0.v20091001 jetty-7.0.0.RC6 jetty-7.0.0.RC5 jetty-7.0.0.RC4 jetty-7.0.0.RC3 jetty-7.0.0.RC2 jetty-7.0.0.RC1 jetty-7.0.0.RC0 jetty-7.0.0.M4 jetty-7.0.0.M3 jetty-7.0.0.M2 jetty-7.0.0.M1 jetty-7.0.0.M0 jetty-7-to-me-jetty-20090330-1 jetty-7-to-jetty-8-base-20110527 jetty-7-to-jetty-8-base-20110524 jetty-7-to-jetty-8-base-20110523 jetty-7-to-jetty-8-base-20110516 jetty-7-to-jetty-8-base-20110412 jetty-7-to-jetty-8-base-20110408 jetty-7-to-jetty-8-base-20110408-2 jetty-7-to-jetty-8-base-20110308 jetty-7-to-jetty-8-base-20110307 jetty-7-to-jetty-8-base-20110110-2 jetty-7-to-jetty-8-base-20110110-1 jetty-7-to-jetty-8-base-20101028-1 jetty-7-to-jetty-8-base-20101025-2 jetty-7-to-jetty-8-base-20101025-1 jetty-7-to-jetty-8-base-20100923-1 jetty-7-to-jetty-8-base-20100922-1 jetty-7-to-jetty-8-base-20100916-1 jetty-7-to-jetty-8-base-20100908-1 jetty-7-to-jetty-8-base-20100903-1
Nothing to show
Find file History
Pull request Compare This branch is 13214 commits behind eclipse:master.
Permalink
..
Failed to load latest commit information.
src
README.txt
pom.xml

README.txt


This is the jetty websocket module that provides a websocket server and the skeleton of a websocket client.

By default websockets is included with a jetty release (with these classes either being in the jetty-websocket jar or in
an aggregate jar (see below).


In order to accept a websocket connection, the websocket handshake request is first routed to normal HTTP request
handling, which must respond with a 101 response and an instance of WebSocketConnection set as the
"org.eclipse.jetty.io.Connection" request attribute.   The accepting behaviour is provided by WebSocketHandler or the
WebSocketServlet class, both of which delegate to the WebSocketFactory class.

A TestServer and TestClient class are available, and can be run either directly from an IDE (if jetty source is
imported), or from the command line with


  java -cp jetty-aggregate/jetty-all/target/jetty-all-7.x.y.jar:jetty-distribution/target/distribution/lib/servlet-api-2.5.jar
  org.eclipse.jetty.websocket.TestServer  --help 

  java -cp jetty-aggregate/jetty-all/target/jetty-all-7.x.y.jar:jetty-distribution/target/distribution/lib/servlet-api-2.5.jar
  org.eclipse.jetty.websocket.TestClient --help


Without a protocol specified, the client will just send/receive websocket PING/PONG packets.    A protocol can be specified for testing other
aspects of websocket.  Specifically the server and client understand the following protocols:

    org.ietf.websocket.test-echo
        Websocket messages are sent by the client and the server will echo every frame.

    org.ietf.websocket.test-echo-broadcast
        Websocket messages are sent by the client and the server will echo every frame to every connection.

    org.ietf.websocket.test-echo-assemble
        Websocket messages are sent by the client and the server will echo assembled messages as a single frame.

    org.ietf.websocket.test-echo-fragment
        Websocket messages are sent and the server will echo each message fragmented into 2 frames.