icebob / vue-websocket

Simple websocket (socket.io) plugin for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementation of native websockets

ralyodio opened this issue · comments

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

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

commented

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

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.

How to use this websocket? There is no specific use

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.

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

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!

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

The example doesn't even work 😞

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.

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

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 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.

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 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!

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...