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

Add method to asynchronously send messages of unknown length #225

Open
glassfishrobot opened this issue Apr 4, 2014 · 3 comments
Open
Labels
enhancement Adding a new feature or improving an existing one
Milestone

Comments

@glassfishrobot
Copy link

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);
}
@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by stuartdouglas

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA WEBSOCKET_SPEC-225

@glassfishrobot glassfishrobot added Priority: Major enhancement Adding a new feature or improving an existing one labels Feb 12, 2018
@glassfishrobot
Copy link
Author

@markt-asf markt-asf changed the title Add method to asynchronously send messages of unkown length Add method to asynchronously send messages of unknown length May 7, 2020
@markt-asf markt-asf added this to the backlog milestone May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding a new feature or improving an existing one
Projects
None yet
Development

No branches or pull requests

2 participants