2
0
mirror of https://github.com/tenrok/vue-native-websocket.git synced 2026-05-25 11:34:05 +03:00
Commit Graph

40 Commits

Author SHA1 Message Date
Lyndon 9a4762f8a6 dev: fix when manually connect and reconnect 2019-02-22 13:29:36 +08:00
Leo Deng 42a44ccd25 Update Main.js
when not hasProxy, the sockets need addListener
2018-11-02 10:33:19 +08:00
Philip Marais 94c131ecfe Connection URL/Opts update with default values
Added the `connectionUrl` & `connectionOpts` parameters with default values, to the manual `connect` function
2018-09-26 11:28:34 +02:00
Philip Marais 684ddfd78d Added connection variable for manual-connect
Added the option to connect to a connection other than the connections dictated in the instantiation.

Can be used as usual with `this.$connect()`, or alternatively `this.$connect('ws://localhost:port/foo/')` to specify a different socket endpoint/channel.
2018-09-26 07:25:25 +02:00
sharkykh 967f58f317 Fix custom mutations feature + test 2018-09-13 03:52:03 +03:00
Viktor Scheglov 6891ca2e81 release 10 2018-09-12 16:46:12 +03:00
Viktor 2835a4b79a Merge pull request #59 from OmgImAlexis/master
add support for custom mutation name
2018-09-12 16:37:13 +03:00
Viktor 4420299865 Merge pull request #68 from mikhailian/master
Check for Proxy before using it
2018-09-12 15:56:28 +03:00
Viktor 8376ad1d8e Merge pull request #53 from denzow/master
Feature handle skip scheme ws url
2018-09-12 15:56:15 +03:00
Alexander Mikhailian 379143d3c9 Check for Proxy before using it 2018-09-11 22:41:21 +02:00
Viktor Scheglov 2d4e4dfa29 fix reconnection ws instance 2018-08-27 18:37:45 +03:00
Alexis Tyler a5e3c863a5 add support for custom mutation name 2018-06-12 15:46:29 +09:30
Joshua Morris 38eecfda57 Bind the local context to the default pass to store handler 2018-06-05 17:02:18 -06:00
Joshua Morris 4d8bf21ab4 Add custom pass to store handler 2018-06-05 11:34:25 -06:00
denzow c0f0209fe0 Feature handle skip scheme ws url
if skip scheme url, like ` //localhost:8080` ,  add `ws` or
`wss` .
2018-05-07 21:39:44 +09:00
Surasak Phothiphiphit 79625aa32f Fix wrong word 2018-04-12 12:32:23 +07:00
Will McNaughton 0494c1388a Convert $connect and $disconnect to arrow functions 2018-04-03 09:54:24 -05:00
Will McNaughton f448e98479 Perform null checks in function 2018-04-02 15:10:51 -05:00
Will McNaughton 738397a278 Make manually connection configurable 2018-04-02 14:54:20 -05:00
Will McNaughton 4a6a39009a Add connect and disconnect functions 2018-04-02 13:55:59 -05:00
Viktor Shcheglov a3b33dd5f3 fixed minor bags 2018-01-08 20:17:34 +03:00
n5leon f30c155298 Fixed context for events calback 2017-11-18 17:02:08 +01:00
Viktor 07328e1548 Add reconnect (#25)
* add ws reconnect

* added in readme text about reconnect
2017-11-13 08:52:29 -08:00
ThomasKlessen 782d400953 namespace support for actions (#24)
* namespace support for actions

* renamed existing tests

* added tests for store-actions with/without namespace

* removed commit parts in action/dispatch tests

* bugfixed failed test runs;
2017-11-13 08:52:01 -08:00
Nicolas Meylan ace2bf5d91 Fix observer mutation name when format: json is used (#9)
According to the documentation: "If there is a .mutation value in the
response data, the corresponding mutation is called with the name
SOCKET_[mutation value]"

However when event data does not contains .mutation value mutation is
null, so the mutation is not find in the store.
2017-07-24 12:49:43 -07:00
Mark Macneil 55aa4a75aa Fixes for empty sub-protocol and missing action names (#8)
* 1. Fixed DOMException: Failed to construct 'WebSocket': The subprotocol '' is invalid. in Chrome when empty protocol arg passed in WS ctor.  2.  Action name was never being set/executed on incoming messages.

* upated docs
2017-07-10 09:09:10 -07:00
Nathan 46e251dcbc Api updates (#7)
* move all instantiation options into the opts hash

* 2.0.0
2017-07-07 09:47:01 -07:00
Nathan b62cc5a27c Specs (#6)
* wire up specs

* tests + fixes for #1

* travis
2017-07-07 09:27:32 -07:00
Aaron Chen 96eb7bbfdc fix wrong parameter. 2017-06-29 15:41:05 +08:00
Aaron Chen 93e17ffe0f support websocket protocol, this is optional option. 2017-06-29 15:31:50 +08:00
nathan ace980d539 native websocket with json parsing, vuex integration and namespacing 2017-05-16 22:58:01 -07:00
Jasper Staats 5cb889fd72 Multiple arguments added for emitting to store
This solves issue #51.
2017-05-02 10:53:51 +02:00
Michgeek 8709b16a78 Add support to native events
Native event was passed capitalized which cause unexpected camelCase
conversion.

Event is now passed without uppercasing and save string transformations

e.g.
SOCKET_CONNECT       => `socket_cONNECT`      instead of `socket_connect`
SOCKET_CONNECT_ERROR => `socket_cONNECTERROR` instead of `socket_connectError`
2017-03-29 16:10:27 +11:00
Michgeek 3a86a906d5 Add support for namespaced Vuex actions 2017-03-21 07:40:42 +11:00
Michgeek 7abefc3bad Add namespaced mutation for Vuex 2017-03-19 23:37:00 +11:00
Pieter Jan De Smedt 0edf7322e6 fix: add listeners to custom socket functions on the created hook instead of beforeCreate hook in the mixin lifecycle 2017-01-03 16:30:46 +01:00
metinseylan 8e0100be09 2.1.0 2016-12-31 01:18:10 +03:00
Metin Seylan b0df13186c missing events & build 2016-11-23 13:59:51 +03:00
Metin Seylan 77a06779dc Added Missing Events
Added Missing Events
2016-11-23 13:55:37 +03:00
Metin Seylan 7f5fac27d0 v2 2016-10-29 00:47:04 +03:00