How to send files over WebSocket with websocat tool?
1
vote
0
answers
66
views
I brought a
wss://
server up using websocat
:
websocat -E -t -v --pkcs12-der=q.pkcs12 wss-listen:0.0.0.0:8443 mirror:
And on the client I am running this command to establish a secure WebSocket connection:
websocat wss://:8443
I can send text using this setup and whatever I send gets echoed back. But now I want to send files on the wss://
connection. How do I do that?
This is how I am sending files using ws://
and it's working fine.
Server:
websocat -s -v 0.0.0.0:8765 > received.txt
Client:
websocat -b ws://:8765 < testfile.txt
I tried something like this:
Server:
websocat -E -t -v --pkcs12-der=q.pkcs12 wss-listen:0.0.0.0:8443 writefile:received.txt
Client:
websocat -E -t wss://echo.websocket.org:8443 < testfile.txt
But I am getting this error:
websocat: WebSocketError: I/O failure
websocat: error running
Any help regarding how do I do it with wss://
connection will really help. Thanks.
If it's not achievable using websocat, then what other tool I can use to bring up a wss://
server and send files to it?
Asked by Aashish Aggarwal
(11 rep)
Apr 23, 2025, 02:36 AM
Last activity: Apr 23, 2025, 07:26 AM
Last activity: Apr 23, 2025, 07:26 AM