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);       
    }   

Reply via email to