vi / websocat

Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
MIT License
6.73k stars 259 forks source link

Max size on outbound messages? #140

Closed spencerwilson closed 2 years ago

spencerwilson commented 2 years ago

Am running

$ websocat -v --protocol graphql-ws wss://example.com/ws
[INFO  websocat::lints] Auto-inserting the line mode
[INFO  websocat::stdio_threaded_peer] get_stdio_peer (threaded)
[INFO  websocat::ws_client_peer] get_ws_client_peer
[INFO  websocat::ws_client_peer] Connected to ws

At this point if I begin typing, or if I paste a large message, my input ends/is truncated at 1024 characters and additional keypresses ring my terminal bell.

My objective is to send a text-mode message to the server that contains 1046 Unicode code points (whose UTF-8 representation is 1046 octets long).

Questions:

  1. Is this indicating an intentional limit on the maximum size of outbound messages?
  2. Can this limit be increased?

The subprotocol I'm speaking, graphql-ws, can involve messages whose size exceeds 1024 code points.

Details:

vi commented 2 years ago

A Mac and 1024 bytes? Looks similar to #103 or #76.

You may want to try using rlwrap websocat ... or some stty workaround.

spencerwilson commented 2 years ago

Thanks for the quick pointer. You're probably right. I found a workaround (using something other than websocat) so I'll close this issue now.