Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement and test a WebSocket Proxy with the 9.4 Jetty API #5726

Merged
merged 5 commits into from Nov 26, 2020

Conversation

lachlan-roberts
Copy link
Contributor

Adding a simple WebSocket to tests using the WebSocketPartialListener and WebSocketPingPongListener interfaces.

  • Text and binary frames are simply forwarded through to the other remote endpoint.
  • Ping and Pong frames are more complex as the implementation forces us to send the pong response when the onPing() method exits.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Copy link
Contributor

@sbordet sbordet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just write an additional test for the idle timeout case: connect, echo a message, then wait until the idle timeout expires => you should see a the connections being closed.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@lachlan-roberts lachlan-roberts merged commit 5941235 into jetty-9.4.x Nov 26, 2020
@lachlan-roberts lachlan-roberts deleted the jetty-9.4.x-websocketProxy branch November 26, 2020 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants