01a5974f4b
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com> # Conflicts: # Jenkinsfile # examples/async-rest/async-rest-webapp/src/test/java/org/eclipse/jetty/example/asyncrest/DemoServer.java # jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java # jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java # jetty-http/src/test/java/org/eclipse/jetty/http/HttpTester.java # jetty-http/src/test/java/org/eclipse/jetty/http/MultiPartParserTest.java # jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java # jetty-http/src/test/java/org/eclipse/jetty/http/matchers/HttpFieldsMatchersTest.java # jetty-maven-plugin/src/test/java/org/eclipse/jetty/maven/plugin/it/TestGetContent.java # jetty-server/src/test/java/org/eclipse/jetty/server/CookieCutterLenientTest.java # jetty-server/src/test/java/org/eclipse/jetty/server/CookieCutterTest.java # jetty-server/src/test/java/org/eclipse/jetty/server/PartialRFC2616Test.java # jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletLifeCycleTest.java # jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipContentLengthTest.java # jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipDefaultNoRecompressTest.java # jetty-servlets/src/test/java/org/eclipse/jetty/servlets/MultipartFilterTest.java # jetty-unixsocket/src/test/java/org/eclipse/jetty/unixsocket/UnixSocketClient.java # jetty-util/src/test/java/org/eclipse/jetty/util/B64CodeTest.java # jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java # jetty-util/src/test/java/org/eclipse/jetty/util/ssl/X509Test.java # jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ClasspathPatternTest.java # jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/LargeMessageTest.java # jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScannerGoodSignaturesTest.java # jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScannerInvalidSignaturesTest.java # jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/metadata/EncoderMetadataSetTest.java # jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/utils/ReflectUtilsTest.java # jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ConfiguratorTest.java # jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java # jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/RestartContextTest.java # jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScannerGoodSignaturesTest.java # jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScannerInvalidSignaturesTest.java # jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/SessionTest.java # jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/ErrorCloseTest.java # jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/ClientConnectTest.java # jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/ClientSessionsTest.java # jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/WebSocketClientTest.java # jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/PartialListenerTest.java # jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/extensions/ExtensionConfigTest.java # jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/util/QuoteUtilQuoteTest.java # jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/util/QuoteUtilTest.java # jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ConnectionManagerTest.java # jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/TomcatServerQuirksTest.java # jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/WebSocketClientInitTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/GeneratorTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ParserTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/TextPayloadParserTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase11.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase12.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase2.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase4.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase73.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventDriverTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedScannerTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/ByteAccumulatorTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtensionTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtensionTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/ConnectionStateTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/http/HttpResponseHeaderParserTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/MessageDebug.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/Utf8CharBufferTest.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/UnitGenerator.java # jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/util/Utf8PartialBuilderTest.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/RedirectWebSocketClientTest.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/SimpleServletServer.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase1.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase2.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase3.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase4.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase5.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6BadUTF.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6GoodUTF.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7BadStatusCodes.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7GoodStatusCodes.java # jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase9.java # pom.xml # tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationsTest.java # tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/JdbcTestHelper.java # tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java # tests/test-webapps/test-proxy-webapp/src/test/java/org/eclipse/jetty/TestTransparentProxyServer.java |
||
---|---|---|
.. | ||
websocket-core | ||
websocket-javax-client | ||
websocket-javax-common | ||
websocket-javax-server | ||
websocket-javax-tests | ||
websocket-jetty-api | ||
websocket-jetty-client | ||
websocket-jetty-common | ||
websocket-jetty-server | ||
websocket-jetty-tests | ||
websocket-servlet | ||
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.