Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
March 24, 2015 Is there websocket client implementation for D | ||||
---|---|---|---|---|
| ||||
Hello! Is there any websocket client implementation in D? I know there is WS server as a part of vibe.d, but it does not seem to include client. Maybe there are some library bindings that I've missed? Thank you, Ilya |
March 25, 2015 Re: Is there websocket client implementation for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Korobitsyn | On 25/03/2015 6:55 a.m., Ilya Korobitsyn wrote:
> Hello!
>
> Is there any websocket client implementation in D?
> I know there is WS server as a part of vibe.d, but it does not seem to
> include client.
> Maybe there are some library bindings that I've missed?
>
> Thank you,
> Ilya
It appears you are on your own.
|
March 25, 2015 Re: Is there websocket client implementation for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Korobitsyn | On Tuesday, 24 March 2015 at 17:55:38 UTC, Ilya Korobitsyn wrote: > Hello! > > Is there any websocket client implementation in D? There's some WebSocket stuff here: https://github.com/adamdruppe/arsd/blob/master/cgi.d It's for server side, but probably contains stuff you need for client too. |
March 25, 2015 Re: Is there websocket client implementation for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to thedeemon | On Wednesday, 25 March 2015 at 07:12:56 UTC, thedeemon wrote:
> It's for server side, but probably contains stuff you need for client too.
Yeah, I've been meaning to write a client for a while but haven't gotten around to it yet. What you do is make a HTTP request with a particular header, and if the server likes it, you're OK and can send messages. If not, the failure should be gracefully reported.
Could probably write it up in a couple hours.... if I had a couple hours :(
|
May 21, 2017 Re: Is there websocket client implementation for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Wednesday, 25 March 2015 at 15:46:31 UTC, Adam D. Ruppe wrote:
> On Wednesday, 25 March 2015 at 07:12:56 UTC, thedeemon wrote:
>> It's for server side, but probably contains stuff you need for client too.
>
> Yeah, I've been meaning to write a client for a while but haven't gotten around to it yet. What you do is make a HTTP request with a particular header, and if the server likes it, you're OK and can send messages. If not, the failure should be gracefully reported.
>
> Could probably write it up in a couple hours.... if I had a couple hours :(
How about now?
|
June 11, 2018 Re: Is there websocket client implementation for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | 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); } |
September 10, 2018 Re: Is there websocket client implementation for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Korobitsyn | On Tuesday, 24 March 2015 at 17:55:38 UTC, Ilya Korobitsyn wrote: > Hello! > > Is there any websocket client implementation in D? > I know there is WS server as a part of vibe.d, but it does not seem to include client. > Maybe there are some library bindings that I've missed? > We just implemented one in D. See https://github.com/huntlabs/hunt-http/tree/master/examples/WebSocketDemo |
December 19, 2019 Re: Is there websocket client implementation for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Heromyth | On Monday, 10 September 2018 at 07:19:03 UTC, Heromyth wrote: > On Tuesday, 24 March 2015 at 17:55:38 UTC, Ilya Korobitsyn wrote: >> Hello! >> >> Is there any websocket client implementation in D? >> I know there is WS server as a part of vibe.d, but it does not seem to include client. >> Maybe there are some library bindings that I've missed? >> > > We just implemented one in D. > See https://github.com/huntlabs/hunt-http/tree/master/examples/WebSocketDemo Hi I wish it would compiled than I would really give it a try. It seems WebSockets moved from hunt-http to hunt-web. hunt-web dependency not yet in dub. When I cloned hunt-web I couldn't get it compiled. I have created bug : https://github.com/huntlabs/hunt-http/issues/13 I hope you have time to fix it soon. Erdemdem |
Copyright © 1999-2021 by the D Language Foundation