Closed ssmmhh closed 4 years ago
Unfortunately, sending both text and binary WebSocket messages is unsupported by current design of websocat.
There is also no obvious workaround. You can help by thinking and describing your opinions about how UX/workflow for mixing binary and text messages when forwarding from TCP would work. Note that status of being a text or binary message is only one part of the problem. Other part is how to find where contents of the file ends and the next text message begins. It would probably involve two TCP sockets or some prefixes/delimiters. To be a part of Websocat, it should be universal (allowing multiple text -> binary -> text
transitions, supporting arbitrary (not necessary JSON) messages, and so on. Otherwise it's better to make a separate tool for the file upload.
What is that service with such API? Maybe there is some dedicated tool for it? Or it is the time to make such tool?
Thank you for your great tools. ^^
I want to use the Web SocketAPI. (via TCP) ex) websocat tcp-l:127.0.0.1:4554 ws://123.456.789.012:8100/api/v1/fileupload
The API works with three commands:
It determines the execution mode and allows only one to be used. (-t or -b) Can I transfer binary data or text data while connected? (I am using the Windows environment.)