websocket-spec
  1. websocket-spec
  2. WEBSOCKET_SPEC-225

Add method to asynchronously send messages of unkown length

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      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);
      }
      
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            stuartdouglas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: