jakartaee / jakartaee/websocket
Add method to asynchronously send messages of unknown length
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 78
- Forks
- 47
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 1
Description
At the moment RemoteEndpoint.Async only has methods that send messages of a known length that are fully buffered in memory. It would be good if this could be extended to also include some way of sending messages piecemeal.
At the moment this can be accomplished using RemoteEndpoint.Basic using the stream and writer, however this requires the use of blocking IO.
As a suggestion as to what this API could look like maybe something like:
void sendPartialText(String message, PartialCallback back);
interface PartialCallback {
void onWritePossible(TextSender sender);
}
interface TextSender {
boolean isReady();
void send(String text, boolean last);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading RemoteEndpoint.Async and compare its buffered send methods with the stream and writer APIs on RemoteEndpoint.Basic. Define the asynchronous partial-send contract, including readiness, callbacks, message completion, and error handling; done means the API design is agreed and covered by the relevant WebSocket behavior tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100