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

Support for longer WebSocket frames #8025

Merged
merged 2 commits into from Nov 20, 2023
Merged

Conversation

spericas
Copy link
Member

Description

  1. Support for writing WS frames of more than 125 bytes, i.e. with lengths that fit in two bytes and eight bytes.
  2. Configuration of max-frame-length to limit the size of a frame read by the server. The JDK WS client splits a long payload into 16K frames.
  3. Some new tests for (1) and (2).

Related to issue #7986.

Documentation

JavaDoc has been updated.

@spericas spericas self-assigned this Nov 17, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 17, 2023
@spericas spericas added webserver websocket WebSocket in Helidon 4.x Version 4.x and removed OCA Verified All contributors have signed the Oracle Contributor Agreement. labels Nov 17, 2023
@spericas spericas added this to the 4.0.1 milestone Nov 17, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 17, 2023
1. Support for writing WS frames of more than 125 bytes, i.e. with lengths that fit in two bytes and eight bytes.
2. Configuration of max-frame-length to limit the size of a frame read by the server. The JDK WS client splits a long payload into 16K frames.
3. Some new tests for (1) and (2).
danielkec
danielkec previously approved these changes Nov 20, 2023
…classpath.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

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

A small possible improvement, fine otherwise

.config()
.protocols()
.stream()
.filter(p -> p instanceof WsConfig)
Copy link
Member

Choose a reason for hiding this comment

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

You could work around the ugly cast by doing (after filter)
.map(WsConfig.class::cast)
which will change the stream to correctly typed one.

@spericas spericas merged commit 6835b45 into helidon-io:main Nov 20, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x OCA Verified All contributors have signed the Oracle Contributor Agreement. webserver websocket WebSocket in Helidon
Projects
Backlog
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

3 participants