curl --no-buffer \
--include \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Sec-WebSocket-Version: 13" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
https://tcpdata.com/ws
# Install: cargo install websocat
websocat wss://tcpdata.com/ws
const ws = new WebSocket('wss://tcpdata.com/ws');
ws.onmessage = (e) => console.log('Echo:', e.data);
ws.send('Hello WebSocket!');
import asyncio
import websockets
async def test():
async with websockets.connect('wss://tcpdata.com/ws') as ws:
await ws.send('Hello WebSocket!')
response = await ws.recv()
print(f'Echo: {response}')
asyncio.run(test())