Giter Site home page Giter Site logo

vue-websocket's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-websocket's Issues

How to set option before connect but not in Vue.use ?

Look like #7
But we need set option before connect but not in Vue.use

main.js

Vue.use(VueWebsocket, null, { autoConnect: false });

App.vue

created() {
        // Like this?  get the bar before connect
        this.$socket.option = {
               query: 'foo='+bar,
               'transports': ['websocket'],
        }
	this.$socket.open();
}

Thanks

Setting secure: true in the Websockets options does not apply and gets set by default to false.

I'm trying to use the package to set a wss:// connection to a domain to be able to use my WebSockets and I'm setting in the options the secure: true part but I'm unable to get my wss connection working. I'll post some screenshots as well as trying to elaborate more.

Code configuration of the socket:
sockets_code


Chrome DevTools Socket Inspection in Console:
chrome_devtools_console


Chrome DevTools Network:
chrome_devtools_network


Curiously I have set in Constants.real_url the URL of my WebSocket as so: http://... because I was previously using socket.io-client but changed to using this package instead. Now I'm seeing that if it's defined as http:// automagically the secure option is set to false and a ws:// connection, if I define the url as https:// I get a wss:// connection but I am unable to connect correctly I get a Status Code: 400 Bad Request.

I'm hoping you can help me clear a few doubts about how and why I need to set the hostname with HTTPS to get a wss connection, I was able to set a wss connection only using socket.io-client using my hostname as HTTP. Our WebSockets server need the HTTP protocol to correctly work but using a WSS protocol.

how to use in html?

insert script in html

<script type="text/javascript" src="../vue-min.js"></script>
<script type="text/javascript" src="../vue-websocket.js"></script>
<body>
<div id="app"></div>
</body>
<script>
Vue.use(VueWebsocket,"ws://a.c/b");
new Vue({el: '#app'});
</script>

In F12 network log, can't see any websocket post? but console has no error print.
so how to use in this case?
thanks

How do I join a room ?

socket.io allows client to specify a room.
Could you provide some examples to join a room please?

vue-touch-keyboard

The README should be updated since I'm guessing you took the README from another project.

vue-touch-keyboard is available under the MIT license.

JWT token setting

Is it possible to set JWT token as header in the connection settings?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.