You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to delete all files (cache) in platforms/android/ant-build/.
72
+
Delete all files in ./platforms/android/ant-build/. These are cache.
62
73
63
74
#### Caution
64
75
When install this plugin, it adds `INTERNET` permission to `AndroidManifest.xml`. If remove this plugin, the permission is also removed at the same time even if it is required for other plugins.
@@ -67,7 +78,7 @@ When install this plugin, it adds `INTERNET` permission to `AndroidManifest.xml`
67
78
### *WebSocket(url[, protocols])*
68
79
The WebSocket(url, protocols) constructor takes one or two arguments. The first argument, url, specifies the URL to which to connect. The second, protocols, is either a string or an array of strings.
69
80
A simple code is as follows:
70
-
```JavaScript
81
+
```javascript
71
82
document.addEventListener('deviceready', function () {
72
83
var ws =newWebSocket('ws://echo.websocket.org');
73
84
@@ -91,19 +102,18 @@ document.addEventListener('deviceready', function () {
91
102
}, false);
92
103
```
93
104
#### Options
94
-
This plugin has the following options. All these parameters are omissible. Of course these don't affect the native WebSocket.
The `origin` is a value to set the request header field.
103
-
The `maxConnectTime` is time to wait for connection. The default value will be 75,000 milliseconds if omit it.
104
-
The `override` is a flag to override the native WebSocket on 4.4 or higher devices. The default value will be false if omit it. Set to true if you want to enable the plugin WebSocket even though those support WebSockets.
105
-
If you want to change these parameters, need to do before creating a instance:
106
-
```JavaScript
105
+
This plugin has the following options. All these parameters are optional. Of course these don't affect the native WebSocket.
106
+
107
+
| key | default value |
108
+
|:---------------------|:-------------:|
109
+
| origin | (empty) |
110
+
| maxConnectTime | 75000 |
111
+
| override | false |
112
+
113
+
`origin` is a value to set the request header field. `maxConnectTime` is time to wait for connection. `override` is a flag to override the native WebSocket on Android 4.4 or later devices. Set to true if want to force them to use the plugin. In most cases, it is slower than the native WebSocket.
114
+
115
+
If want to change these parameters, need to do before creating a instance:
116
+
```javascript
107
117
WebSocket.pluginOptions= {
108
118
origin:'http://example.com',
109
119
maxConnectTime:5000,
@@ -116,18 +126,22 @@ var ws = new WebSocket('ws://echo.websocket.org');
116
126
Transmits data to the server over the WebSocket connection. The data takes a string, a blob, or an arraybuffer.
117
127
118
128
#### Notes
119
-
The size of messages that can transmit and receive at a time depends on the heap memory on devices. You would be better to consider a way to split messages if those are large (hundreds of kilobytes).
129
+
The size of message that can transmit and receive at a time depends on heap size. Would be better to consider a way to split a message if it is quite large.
120
130
121
131
### *close([code[, reason]])*
122
132
Closes the WebSocket connection or connection attempt, if any.
123
133
124
134
## Change Log
135
+
#### 0.8.1
136
+
* fixed frame aggregation error (thanks to @Atsyn)
137
+
* fixed binary transmission for the case of using the plugin on 4.4 or later
138
+
125
139
#### 0.8.0
126
140
* performance tuning (about 5% to 15% faster than previous versions)
127
141
* deployed the sources of Jetty directly (instead the jar file)
128
142
* abolished the maxTextMessageSize/maxBinaryMessageSize options
129
143
* added the "override" option
130
-
*refactoring
144
+
*refactor
131
145
132
146
#### 0.7.0
133
147
* resolved the issue of SSL on 4.0 and 2.3 (thanks to @agalazis and koush/AndroidAsync)
0 commit comments