vue-websocket icon indicating copy to clipboard operation
vue-websocket copied to clipboard

Implementation of native websockets

Open ralyodio opened this issue 8 years ago • 17 comments

Is it possible to use native websockets instead of socket.io?

ralyodio avatar Dec 10 '16 20:12 ralyodio

Sorry, but not. It's only working with socket.io

icebob avatar Dec 12 '16 10:12 icebob

The package name is kinda misleading then as native websocket is kinda different from socketio

gholol avatar Dec 20 '16 00:12 gholol

I second this, it should be called vue-socketio or similar. People looking to use (or even make) a vue-websocket plugin that utilises the native websocket would be disappointed. Either way I don't believe vue-websocket is a good name for this package.

brhx avatar Feb 20 '17 09:02 brhx

How to use this websocket? There is no specific use

boneq avatar Apr 27 '17 03:04 boneq

Please rename this github repo to vue-socketio as this is very misleading. I was looking for a native browser JS websocket integration with vue, not socket.io.

kvnxiao avatar Sep 18 '17 18:09 kvnxiao

I also wasted time with this library when i was looking for native websockets. By the way there is also https://github.com/MetinSeylan/Vue-Socket.io and https://github.com/nathantsoi/vue-native-websocket

flip111 avatar Dec 20 '17 16:12 flip111

Thanks a lot, let me see

2017-12-21 0:55 GMT+08:00 flip111 [email protected]:

I also wasted time with this library when i was looking for native websockets. By the way there is also https://github.com/ MetinSeylan/Vue-Socket.io

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/icebob/vue-websocket/issues/2#issuecomment-353119469, or mute the thread https://github.com/notifications/unsubscribe-auth/AXPl96hAtTiXN-n-Iakkz3KQs4FGFQO9ks5tCTvxgaJpZM4LJv_z .

boneq avatar Dec 21 '17 07:12 boneq

I'm unlocking this issue so I can gather feedback.

It seems as though vue-websocket will be this package name, and the owner isn't interested in changing it. So, end of discussion on that particular point I'm afraid.

However, I would like to introduce and supplement the socket.io implementation with a native websockets implementation.

I wanted to see what public opinion was on this change, and whether or not it would be outside the scope of this project. I don't want to remove or break any functionality for those who do use this package for socket.io. Looking forward to hearing your thoughts!

brhx avatar Aug 29 '18 00:08 brhx

I would be interested in native sockets instead of socket.io You could always fork it and make the change. vue-websocket-native

ralyodio avatar Aug 29 '18 03:08 ralyodio

The example doesn't even work :disappointed:

Nolaan avatar Sep 04 '18 14:09 Nolaan

nope. that's why i gave up on this. if someone wants to fork it and make it native ws i'll test it out.

ralyodio avatar Sep 05 '18 00:09 ralyodio

Apologies while I get up to speed, I've just taken over as the lead maintainer for a while.

I'll test out the example at some point in the next few days and update it

brhx avatar Sep 05 '18 00:09 brhx

Thanks for the head up @sam3d it's not your fault. I'm getting very frustrated, I've started using VueJs for a personnal project 2 weeks ago and so far it looks like only roadblocks ahead. None of the tutorial I've followed worked for any project, or seldom. I've used modules where the start function isn't starting anything and most of the time when you link up in GH the usual answer is : provide a demo project if you want us to trust you that's an issue.

I'm not sure if I will ever recommend the VueJS ecosystem.... Or am I alone in the universe?

Nolaan avatar Sep 05 '18 07:09 Nolaan

@Nolaan you are probably alone in that universe. the VueJS ecosystem is perfectly fine, functional, and growing. If you're looking for a native websocket implementation, I suggest you to try going with simply just the websocket api documentation from https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API ; that's what I ended up doing.

kvnxiao avatar Sep 05 '18 07:09 kvnxiao

perfectly fine is a little bit meh especially when I think about backward compatibility and dependencies... But probably you're right, don't get me wrong I can communicate with my server over the dev console of Chrome/Firefox (using SSL) just the module won't connect.

Nolaan avatar Sep 05 '18 07:09 Nolaan

@Nolaan Thank you for saying that 🙂 I'm a huge fan of the Vue.js ecosystem - it's definitely still got its fair share of teething problems that's for sure, but on the whole it's actually growing up really well.

I'm sorry to hear you're getting frustrated getting into Vue, I totally get it. I updated the README not too long ago with other alternatives to using this package for native websockets, let me know if there's anything I can do!

brhx avatar Sep 05 '18 12:09 brhx

Vue eco-system may not be as extensive or mature as React, but between the two, it is easier for me to dive in to Vue to fix things, rather than wait for someone to implement the feature...

ais-one avatar Sep 11 '18 07:09 ais-one