Commit Graph

10 Commits

Author SHA1 Message Date
Gary Russell
1d6caa21ad INTEXT-45 Fix INT-2936 Work Around
When not using NIO, could get a message
"Max supported length exceeded" if the
socket is closed abruptly.
2013-02-25 15:20:33 -05:00
Gary Russell
e068031aba INTEXT-47 WebSocket PING Polishing
Use last receive time (instead of last send) because mostly
write sockets (from the server perspective) may still time out.
2013-02-24 18:01:01 -05:00
Gary Russell
d1046c9692 INTEXT-47 WebSocket Scheduled PINGs
Send a ping every 25 seconds to all open WebSockets.

Configure interval using 'pingInterval' property on
WebSocketTcpConnectionInterceptorFactory.

Set to 0 to disable pings.
2013-02-24 13:56:02 -05:00
Gary Russell
7d81ee80ab INTEXT-45 Polishing Add CF Bean Name to Event 2013-02-22 16:34:15 -05:00
Gary Russell
b1448bdc60 INTEXT-45 Add Work Around for INT-2936
Need to check for closed stream with NIO.
2013-02-16 09:20:51 -05:00
Gary Russell
870f76b58f INTEXT-45 SI 3.0.0.M1 - now 1.0.0.BUILD-SNAPSHOT
- Use core TCP eventing for WebSocketEvents; change Type literals to enumerations
- Use a WebSocketMessageMapper instead of rebuilding the message in the interceptor
- Use core TCP Abstract Serializer
- Use 3.0 API instead of reflection to get key for Deserializer state
2013-02-15 16:14:31 -05:00
Gary Russell
a0c87a49e7 Fix WebSocketEvent getter Visibility
protected instead of public
2013-01-14 12:28:56 -05:00
Gary Russell
d66b3c4794 Add WebSocket Events
Building on TCP Event publishing in S.I. 3.0, add events
for 'HANDSHAKE_COMPLETE' and 'WEBSOCKET_CLOSED'.

Update DemoService to consume these events.

Change ws.html demo so that the service is started immediately
and the 'command' box is now prefilled with 'stop'.

When closing the websocket, the DemoService immediately
removes the connection from its map, rather than waiting for
an exception on the write.
2013-01-14 12:00:15 -05:00
Gary Russell
1b47b546c3 INTEXT-33 Add Path and QueryString Headers
Capture the URI path and query string and provide in message
headers for each message received on a web socket.

Fix tests package name.
2013-01-10 11:40:57 -05:00
Gary Russell
2034dbb6c8 INTEXT-24 Lightweight WebSocket Server
* Add Lightweight WebSocket Server Support
* Run WebSocketServerTests and open ws.html in a browser.
  - Sending 'start' begins sending an incrementing # once per second.
  - 'stop' stops the stream (leaving the socket open), 'start' resumes again.
  - Test terminates after 60 seconds.
* Fixes and Improvements for WebSocket Server
  - fix masking
  - fix bytes sent
  - add error handling to remove dead sockets
  - create new web page instead of using vert.x example
  - add status box
  - automatically update message to send to start/stop appropriately
  - update SI to 2.2.0.RELEASE
  - change test to a main()
* Use Interceptor for Handshake
* Move handshake to an interceptor instead of doing it in the SI flow.
* Add close button to web page.
* Add code to remove state from deserializer on close.
* Implement Orderly Close Per RFC6455
* Rename Packages - org.springframework.integration.x.*
* Change Version to 0.1.0.
* Autbahn Test Suite - All Tests Pass
  - 1.1.x tests from the Autobahn Test Suite.
  - Autobahn 1.2.x Tests (Binary)
  - Autobahn Test 2.* (Ping/Pong)
  - Autobahn Tests 3.* (Reserved Bits)
  - Autobahn Tests 4.* (Invalid Opcodes)
  - Autobahn 5.* (Fragmentation)
  - Autobahn 6.* (UTF-8 Handling)
  - Autobahn Tests 7.* (Close Handling)
* "non-strict" results - fast fail on bad UTF-8. We currently don't detect the bad UTF-8 until all fragments are received.
* Run AutobahnTests.java and add the following to fuzzingclient.json...

    {"agent": "SIServer", "url": "ws://localhost:18080", "options": {"version": 18}}

* Remove sysout
* Replace with logger.debug().
* Remove SockJS Dependencies
  - Project started as a SockJS client; WebSocket classes were incorrectly dependent on some SockJS code.
* Extracted the WebSocket code to its own class hierarchy.
* Test Autobahn with SSL (wss://...)
  - Add trust store and key store.
  - Add config to listen for wss: as well as ws: connections
* To test Autobahn for both ws and wss - In the wstest config file use:

    "servers": [
        {"agent": "SIServer", "url": "ws://localhost:18080", "options": {"version": 18}},
        {"agent": "SIServerSSL", "url": "wss://localhost:28080", "options": {"version": 18}}
              ],

* Polishing + Resequence when Using NIO
  - Improve debug logging
  - Clear fragments
  - Add ResequencingMessageHandler to resequence messages when using NIO (frames can arrive on different threads, out of order; this causes issues with the Autobahn tests.
* Reject Non WS Connections
  - only apply Resequencer if NIO Connection factory is configured with apply-sequence.
  - check protocol version - only 13 is supported.
2013-01-07 16:35:02 -05:00