Is there websocket client implementation for D
kerdemdemir
kerdemdemir at gmail.com
Mon Jun 11 16:35:01 UTC 2018
Hi
vibe.d has a client implementation.
http://vibed.org/api/vibe.http.websockets/WebSocket
It is as simple as :
auto ws_url =
URL("wss://stream.binance.com:9443/ws/ethbtc@aggTrade");
auto ws = connectWebSocket(ws_url);
if ( !ws.connected )
return;
while ( true )
{
if (ws && ws.dataAvailableForRead())
{
writeln("Recieve", ws.receiveText());
}
sleep(100.msecs);
}
More information about the Digitalmars-d-learn
mailing list