nimble install whisky
Whisky is a blocking WebSocket client. This library provides an alternative to async for situations where it is easier or more comfortable to write blocking code.
Whisky has no dependencies other than the Nim standard library.
Remember to include -d:ssl
if connecting to wss://
servers.
Using Whisky can be as easy as:
import whisky
let ws = newWebSocket("ws://...")
while true:
echo ws.receiveMessage()