October 23, 2018 Re: D alternative for node.js's socket.IO? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Fleel | On Sunday, 21 October 2018 at 20:14:46 UTC, Fleel wrote: > Does anyone know of a good D alternative for the socket.IO server (https://socket.io)? I would like to transition my server from node.js to D, but I can't find any D equivalents to socket.IO. (I've seen http://socket.io.dub.pm, but it is dead). Are there any good D libraries that can do the same thing as socket.IO? Thanks! https://diamondmvc.org/docs/web-advanced/#websockets |
October 23, 2018 Re: D alternative for node.js's socket.IO? | ||||
---|---|---|---|---|
| ||||
Posted in reply to bauss | On Tuesday, 23 October 2018 at 11:13:16 UTC, bauss wrote:
> On Sunday, 21 October 2018 at 20:14:46 UTC, Fleel wrote:
>> Does anyone know of a good D alternative for the socket.IO server (https://socket.io)? I would like to transition my server from node.js to D, but I can't find any D equivalents to socket.IO. (I've seen http://socket.io.dub.pm, but it is dead). Are there any good D libraries that can do the same thing as socket.IO? Thanks!
>
> https://diamondmvc.org/docs/web-advanced/#websockets
Ignore this. I just saw a websocket example here and figured that was it.
I will add support for socket.io in Diamond within next version (3.X.X) but it's not coming for a while.
|
October 24, 2018 Re: D alternative for node.js's socket.IO? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Neia Neutuladh | On 10/22/18 6:08 PM, Neia Neutuladh wrote:
> On Mon, 22 Oct 2018 20:14:53 +0000, Fleel wrote:
>>
>> How simple is Vibe.D's method of sending messages between client and
>> server? In socket.IO all I have to do is (on the sending side)
>> socket.emit("testMessage", "Hi"), and on the receiving side,
>> socket.on("testMessage", function(contents) {console.log(contents)}). Is
>> Vibe.D as simple as this?
>
> Not quite as simple; socket.io is a very slightly higher level API.
>
Sounds like perhaps a feature request (or PR) for a simple RPC API in Vibe.D is in order? Sounds like it wouldn't be too difficult to just get it working.
Things in D *CAN* be just as dead-simple as in any other language. 'Tis a shameful embarrassment whenever they're not... :(
|
October 24, 2018 Re: D alternative for node.js's socket.IO? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky (Abscissa) | On 10/24/18 4:00 AM, Nick Sabalausky (Abscissa) wrote:
> On 10/22/18 6:08 PM, Neia Neutuladh wrote:
>> On Mon, 22 Oct 2018 20:14:53 +0000, Fleel wrote:
>>>
>>> How simple is Vibe.D's method of sending messages between client and
>>> server? In socket.IO all I have to do is (on the sending side)
>>> socket.emit("testMessage", "Hi"), and on the receiving side,
>>> socket.on("testMessage", function(contents) {console.log(contents)}). Is
>>> Vibe.D as simple as this?
>>
>> Not quite as simple; socket.io is a very slightly higher level API.
>>
>
> Sounds like perhaps a feature request (or PR) for a simple RPC API in Vibe.D is in order? Sounds like it wouldn't be too difficult to just get it working.
>
> Things in D *CAN* be just as dead-simple as in any other language. 'Tis a shameful embarrassment whenever they're not... :(
I'd bet this could even be based on Vibe.D's REST functionality, under-the-hood.
|
Copyright © 1999-2021 by the D Language Foundation