Skip to content

Conversation

lachlan-roberts
Copy link
Contributor

Closes #13290

This reduces the number of times we do a ByteBuffer.slice() when sending a frame in WebSocket, now the buffer of the Frame is consumed after the call to CoreSession.sendFrame.

Currently this PR has the potential to impact users of Jetty / Jakarta WebSocket, as now the ByteBuffers sent with the sendBinary methods will consume the buffer.

But the Jakarta API now does specify that the container should consume the ByteBuffer (see discussion on jakartaee/websocket#209).

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, beside the 2 simplifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Consider changing 12.1 websocket-core to consume frame buffers on sendFrame

2 participants