Skip to content

Cannot send partial message with JettyWebSocketSession #34088

@OPeyrusse

Description

@OPeyrusse

As we can see in the code snippet below, it is not possible to send TextMessage where isLast is set to false.

protected void sendTextMessage(TextMessage message) throws IOException {
useSession((session, callback) -> session.sendText(message.getPayload(), callback));
}

public TextMessage(CharSequence payload, boolean isLast) {
super(payload.toString(), isLast);
this.bytes = null;
}

However, the API exists in Jetty, in the form of Session#sendPartialText(String, boolean, Callable). Is there any reason for not using it?

https://github.com/jetty/jetty.project/blob/jetty-12.0.x/jetty-core/jetty-websocket/jetty-websocket-jetty-api/src/main/java/org/eclipse/jetty/websocket/api/Session.java#L99-L110

From basic testing, it seems that calling it is still not complying, but I may have made boggus changes and broken the code.

Thank you for any reply

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: messagingIssues in messaging modules (jms, messaging)status: feedback-reminderWe've sent a reminder that we need additional information before we can continuestatus: waiting-for-feedbackWe need additional information before we can continue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions