UNPKG

41.7 kBHTMLView Raw
1<!DOCTYPE html>
2
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width">
7 <title>CrossBrowdy API documentation [printable] Namespace: SockJS</title>
8
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13
14 <link type="text/css" rel="stylesheet" href="styles/site.yeti.css">
15
16</head>
17
18<body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
19
20<div class="navbar navbar-default navbar-fixed-top ">
21<div class="container">
22 <div class="navbar-header">
23 <a class="navbar-brand" href="index.html">CrossBrowdy API documentation [printable]</a>
24 <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25 <span class="icon-bar"></span>
26 <span class="icon-bar"></span>
27 <span class="icon-bar"></span>
28 </button>
29 </div>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
32
33 <li class="dropdown">
34 <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
35 <ul class="dropdown-menu inline">
36 <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li>
37 </ul>
38 </li>
39
40 <li class="dropdown">
41 <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42 <ul class="dropdown-menu inline">
43 <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
44 </ul>
45 </li>
46
47 <li class="dropdown">
48 <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49 <ul class="dropdown-menu inline">
50 <li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li><li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li>
51 </ul>
52 </li>
53
54 </ul>
55
56 <div class="col-sm-3 col-md-3">
57 <form class="navbar-form" role="search">
58 <div class="input-group">
59 <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60 <div class="input-group-btn">
61 <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62 </div>
63 </div>
64 </form>
65 </div>
66
67 </div>
68
69</div>
70</div>
71
72
73<div class="container" id="toc-content" style="width:100%;">
74<div class="row" style="width:100%;">
75
76
77 <div class="col-md-8" style="width:85%;">
78
79 <div id="main">
80
81
82
83 <h1 class="page-title">Namespace: SockJS</h1>
84
85<section>
86
87<header>
88
89 <h2>
90 <span class="ancestors"><a href="CB_Net.html">CB_Net</a><a href="CB_Net.Sockets.html">.Sockets</a>.</span>
91
92 SockJS
93 </h2>
94
95
96</header>
97
98
99<article>
100 <div class="container-overview">
101
102
103 <div class="description"><p>Property that contains the functions and properties related with the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library.</p></div>
104
105
106
107<dl class="details">
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
138 <dd class="tag-source">
139 <ul class="dummy">
140 <li>
141 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html">CrossBase/net/sockets/CB_Net_Sockets.js</a>,
142 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html#sunlight-1-line-18">line 18</a>
143 </li>
144 </ul>
145 </dd>
146
147
148
149
150
151
152
153</dl>
154
155
156
157
158 </div>
159
160
161
162
163
164
165
166
167
168
169
170
171 <h3 class="subsection-title">Members</h3>
172
173 <dl>
174
175<hr>
176<dt class="name" id=".websocketLast">
177 <h4 id=".websocketLast"><span class="type-signature">&lt;static, readonly> </span>websocketLast<span class="type-signature"> :Object|null</span></h4>
178
179
180</dt>
181<dd>
182
183 <div class="description">
184 <p>Keeps the last SockJS created.</p>
185 </div>
186
187
188
189 <h5>Type:</h5>
190 <ul>
191 <li>
192
193<span class="param-type">Object</span>
194|
195
196<span class="param-type">null</span>
197
198
199
200 </li>
201 </ul>
202
203
204
205<dl class="details">
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
236 <dd class="tag-source">
237 <ul class="dummy">
238 <li>
239 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html">CrossBase/net/sockets/CB_Net_Sockets.js</a>,
240 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html#sunlight-1-line-31">line 31</a>
241 </li>
242 </ul>
243 </dd>
244
245
246
247
248
249
250
251</dl>
252
253
254
255</dd>
256
257 </dl>
258
259
260
261 <h3 class="subsection-title">Methods</h3>
262
263 <dl>
264
265<hr>
266<dt>
267 <h4 class="name" id=".close"><span class="type-signature">&lt;static> </span>close<span class="signature">( [websocket] [, onError])</span><span class="type-signature"> &rarr; {undefined|false}</span></h4>
268
269
270</dt>
271<dd>
272
273
274 <div class="description">
275 <p>Tries to close the websockets connection. Using the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library internally.</p>
276 </div>
277
278
279
280
281
282
283
284
285 <h5>Parameters:</h5>
286
287
288<table class="params table table-striped">
289 <thead>
290 <tr>
291
292 <th style="width:12%; min-width:110px;">Name</th>
293
294
295 <th style="width:12%; min-width:110px;">Type</th>
296
297
298 <th style="width:12%; min-width:110px;">Argument</th>
299
300
301
302 <th style="width:12%; min-width:110px;">Default</th>
303
304
305 <th class="last" style="min-width:310px;">Description</th>
306 </tr>
307 </thead>
308
309 <tbody>
310
311
312 <tr>
313
314 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>websocket</code></td>
315
316
317 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
318
319
320<span class="param-type">function</span>
321
322
323
324
325 </td>
326
327
328 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
329
330 &lt;optional><br>
331
332
333
334
335
336 </td>
337
338
339
340 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
341
342 <a href="CB_Net.Sockets.SockJS.html#.websocketLast"><code>CB_Net.Sockets.SockJS.websocketLast</code></a>
343
344 </td>
345
346
347 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The SockJS object that we want to use. If not provided, it will try to use the last one created (if any) which is stored in <a href="CB_Net.Sockets.SockJS.html#.websocketLast"><code>CB_Net.Sockets.SockJS.websocketLast</code></a>.</p></td>
348 </tr>
349
350
351
352 <tr>
353
354 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>onError</code></td>
355
356
357 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
358
359
360<span class="param-type">function</span>
361
362
363
364
365 </td>
366
367
368 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
369
370 &lt;optional><br>
371
372
373
374
375
376 </td>
377
378
379
380 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
381
382 </td>
383
384
385 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function for the event &quot;onerror&quot; used by the SockJS object. If provided, it will replace the previous one (if any). Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation.</p></td>
386 </tr>
387
388
389 </tbody>
390</table>
391
392
393
394
395<dl class="details">
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
426 <dd class="tag-source">
427 <ul class="dummy">
428 <li>
429 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html">CrossBase/net/sockets/CB_Net_Sockets.js</a>,
430 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html#sunlight-1-line-135">line 135</a>
431 </li>
432 </ul>
433 </dd>
434
435
436
437
438
439
440
441</dl>
442
443
444
445
446
447
448
449
450
451
452
453
454
455 <h5>Returns:</h5>
456
457
458<div class="param-desc">
459 <p>Returns undefined (the same as the &quot;close&quot; function of the SockJS object) if the SockJS has been used or false otherwise.</p>
460</div>
461
462
463
464<dl>
465 <dt>
466 Type
467 </dt>
468 <dd>
469
470<span class="param-type">undefined</span>
471|
472
473<span class="param-type">false</span>
474
475
476
477 </dd>
478</dl>
479
480
481
482
483
484</dd>
485
486
487
488<hr>
489<dt>
490 <h4 class="name" id=".listen"><span class="type-signature">&lt;static> </span>listen<span class="signature">(serverURL [, onOpen] [, onClose] [, onMessage] [, onError] [, options] [, protocols])</span><span class="type-signature"> &rarr; {Object|null}</span></h4>
491
492
493</dt>
494<dd>
495
496
497 <div class="description">
498 <p>Creates the websockets object and sets the listeners. Using the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library internally.</p>
499 </div>
500
501
502
503
504
505
506
507
508 <h5>Parameters:</h5>
509
510
511<table class="params table table-striped">
512 <thead>
513 <tr>
514
515 <th style="width:12%; min-width:110px;">Name</th>
516
517
518 <th style="width:12%; min-width:110px;">Type</th>
519
520
521 <th style="width:12%; min-width:110px;">Argument</th>
522
523
524
525
526 <th class="last" style="min-width:310px;">Description</th>
527 </tr>
528 </thead>
529
530 <tbody>
531
532
533 <tr>
534
535 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>serverURL</code></td>
536
537
538 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
539
540
541<span class="param-type">string</span>
542
543
544
545
546 </td>
547
548
549 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
550
551
552
553
554
555 </td>
556
557
558
559
560 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The URL of the SockJS server. This will be used as the first parameter when it calls the constructor of SockJS internally. Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation (the parameter is called &quot;url&quot;).</p></td>
561 </tr>
562
563
564
565 <tr>
566
567 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>onOpen</code></td>
568
569
570 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
571
572
573<span class="param-type">function</span>
574
575
576
577
578 </td>
579
580
581 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
582
583 &lt;optional><br>
584
585
586
587
588
589 </td>
590
591
592
593
594 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function for the event &quot;onopen&quot; used by the SockJS object. Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation.</p></td>
595 </tr>
596
597
598
599 <tr>
600
601 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>onClose</code></td>
602
603
604 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
605
606
607<span class="param-type">function</span>
608
609
610
611
612 </td>
613
614
615 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
616
617 &lt;optional><br>
618
619
620
621
622
623 </td>
624
625
626
627
628 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function for the event &quot;onclose&quot; used by the SockJS object. Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation.</p></td>
629 </tr>
630
631
632
633 <tr>
634
635 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>onMessage</code></td>
636
637
638 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
639
640
641<span class="param-type">function</span>
642
643
644
645
646 </td>
647
648
649 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
650
651 &lt;optional><br>
652
653
654
655
656
657 </td>
658
659
660
661
662 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function for the event &quot;onmessage&quot; used by the SockJS object. Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation.</p></td>
663 </tr>
664
665
666
667 <tr>
668
669 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>onError</code></td>
670
671
672 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
673
674
675<span class="param-type">function</span>
676
677
678
679
680 </td>
681
682
683 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
684
685 &lt;optional><br>
686
687
688
689
690
691 </td>
692
693
694
695
696 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function for the event &quot;onerror&quot; used by the SockJS object. Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation.</p></td>
697 </tr>
698
699
700
701 <tr>
702
703 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>options</code></td>
704
705
706 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
707
708
709<span class="param-type">Object</span>
710
711
712
713
714 </td>
715
716
717 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
718
719 &lt;optional><br>
720
721
722
723
724
725 </td>
726
727
728
729
730 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The desired options for the SockJS object. This will be used as the third parameter when it calls the constructor of SockJS internally. Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation (the parameter is called &quot;options&quot;).</p></td>
731 </tr>
732
733
734
735 <tr>
736
737 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>protocols</code></td>
738
739
740 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
741
742
743<span class="param-type">array</span>
744
745
746
747
748 </td>
749
750
751 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
752
753 &lt;optional><br>
754
755
756
757
758
759 </td>
760
761
762
763
764 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>This will be used as the second parameter when it calls the constructor of SockJS internally. Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation (the parameter is called &quot;_reserved&quot;).</p></td>
765 </tr>
766
767
768 </tbody>
769</table>
770
771
772
773
774<dl class="details">
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
805 <dd class="tag-source">
806 <ul class="dummy">
807 <li>
808 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html">CrossBase/net/sockets/CB_Net_Sockets.js</a>,
809 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html#sunlight-1-line-65">line 65</a>
810 </li>
811 </ul>
812 </dd>
813
814
815
816
817
818
819
820</dl>
821
822
823
824
825
826
827
828
829
830
831
832
833
834 <h5>Returns:</h5>
835
836
837<div class="param-desc">
838 <p>Returns a SockJS object. Read the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation for more information. In the case of error, returns null.</p>
839</div>
840
841
842
843<dl>
844 <dt>
845 Type
846 </dt>
847 <dd>
848
849<span class="param-type">Object</span>
850|
851
852<span class="param-type">null</span>
853
854
855
856 </dd>
857</dl>
858
859
860
861
862
863</dd>
864
865
866
867<hr>
868<dt>
869 <h4 class="name" id=".open"><span class="type-signature">&lt;static> </span>open<span class="signature">()</span><span class="type-signature"></span></h4>
870
871
872</dt>
873<dd>
874
875
876 <div class="description">
877 <p>Alias for <a href="CB_Net.Sockets.SockJS.html#.listen"><code>CB_Net.Sockets.SockJS.listen</code></a>.</p>
878 </div>
879
880
881
882
883
884
885
886
887
888
889<dl class="details">
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
920 <dd class="tag-source">
921 <ul class="dummy">
922 <li>
923 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html">CrossBase/net/sockets/CB_Net_Sockets.js</a>,
924 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html#sunlight-1-line-48">line 48</a>
925 </li>
926 </ul>
927 </dd>
928
929
930
931
932
933 <dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
934 <dd class="tag-see">
935 <ul>
936 <li><a href="CB_Net.Sockets.SockJS.html#.listen"><code>CB_Net.Sockets.SockJS.listen</code></a></li>
937 </ul>
938 </dd>
939
940
941
942</dl>
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958</dd>
959
960
961
962<hr>
963<dt>
964 <h4 class="name" id=".send"><span class="type-signature">&lt;static> </span>send<span class="signature">(message [, websocket] [, onError])</span><span class="type-signature"> &rarr; {undefined|false}</span></h4>
965
966
967</dt>
968<dd>
969
970
971 <div class="description">
972 <p>Sends a websockets message. Using the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library internally.</p>
973 </div>
974
975
976
977
978
979
980
981
982 <h5>Parameters:</h5>
983
984
985<table class="params table table-striped">
986 <thead>
987 <tr>
988
989 <th style="width:12%; min-width:110px;">Name</th>
990
991
992 <th style="width:12%; min-width:110px;">Type</th>
993
994
995 <th style="width:12%; min-width:110px;">Argument</th>
996
997
998
999 <th style="width:12%; min-width:110px;">Default</th>
1000
1001
1002 <th class="last" style="min-width:310px;">Description</th>
1003 </tr>
1004 </thead>
1005
1006 <tbody>
1007
1008
1009 <tr>
1010
1011 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>message</code></td>
1012
1013
1014 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1015
1016
1017<span class="param-type">string</span>
1018
1019
1020
1021
1022 </td>
1023
1024
1025 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1026
1027
1028
1029
1030
1031 </td>
1032
1033
1034
1035 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1036
1037 </td>
1038
1039
1040 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The message that we want to send. This will be used as the first and unique parameter when it calls the &quot;send&quot; function of the SockJS object internally. Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation.</p></td>
1041 </tr>
1042
1043
1044
1045 <tr>
1046
1047 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>websocket</code></td>
1048
1049
1050 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1051
1052
1053<span class="param-type">function</span>
1054
1055
1056
1057
1058 </td>
1059
1060
1061 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1062
1063 &lt;optional><br>
1064
1065
1066
1067
1068
1069 </td>
1070
1071
1072
1073 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1074
1075 <a href="CB_Net.Sockets.SockJS.html#.websocketLast"><code>CB_Net.Sockets.SockJS.websocketLast</code></a>
1076
1077 </td>
1078
1079
1080 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The SockJS object that we want to use. If not provided, it will try to use the last one created (if any) which is stored in <a href="CB_Net.Sockets.SockJS.html#.websocketLast"><code>CB_Net.Sockets.SockJS.websocketLast</code></a>.</p></td>
1081 </tr>
1082
1083
1084
1085 <tr>
1086
1087 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>onError</code></td>
1088
1089
1090 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1091
1092
1093<span class="param-type">function</span>
1094
1095
1096
1097
1098 </td>
1099
1100
1101 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1102
1103 &lt;optional><br>
1104
1105
1106
1107
1108
1109 </td>
1110
1111
1112
1113 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1114
1115 </td>
1116
1117
1118 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function for the event &quot;onerror&quot; used by the SockJS object. If provided, it will replace the previous one (if any). Following the same rules as in the <a href="https://github.com/sockjs/sockjs-client">SockJS client</a> library documentation.</p></td>
1119 </tr>
1120
1121
1122 </tbody>
1123</table>
1124
1125
1126
1127
1128<dl class="details">
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1159 <dd class="tag-source">
1160 <ul class="dummy">
1161 <li>
1162 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html">CrossBase/net/sockets/CB_Net_Sockets.js</a>,
1163 <a href="CrossBase_net_sockets_CB_Net_Sockets.js.html#sunlight-1-line-102">line 102</a>
1164 </li>
1165 </ul>
1166 </dd>
1167
1168
1169
1170
1171
1172
1173
1174</dl>
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188 <h5>Returns:</h5>
1189
1190
1191<div class="param-desc">
1192 <p>Returns undefined (the same as the &quot;send&quot; function of the SockJS object) if the SockJS has been used or false otherwise.</p>
1193</div>
1194
1195
1196
1197<dl>
1198 <dt>
1199 Type
1200 </dt>
1201 <dd>
1202
1203<span class="param-type">undefined</span>
1204|
1205
1206<span class="param-type">false</span>
1207
1208
1209
1210 </dd>
1211</dl>
1212
1213
1214
1215
1216
1217</dd>
1218
1219 </dl>
1220
1221
1222
1223
1224
1225</article>
1226
1227</section>
1228
1229
1230
1231
1232 </div>
1233 </div>
1234
1235 <div class="clearfix"></div>
1236
1237
1238 <div class="col-md-3">
1239 <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md" style="display:none; visibility:hidden;"></div>
1240 </div>
1241
1242
1243</div>
1244</div>
1245
1246
1247 <div class="modal fade" id="searchResults">
1248 <div class="modal-dialog">
1249 <div class="modal-content">
1250 <div class="modal-header">
1251 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
1252 <h4 class="modal-title">Search results</h4>
1253 </div>
1254 <div class="modal-body"></div>
1255 <div class="modal-footer">
1256 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
1257 </div>
1258 </div><!-- /.modal-content -->
1259 </div><!-- /.modal-dialog -->
1260 </div>
1261
1262
1263<footer>
1264
1265
1266 <span class="copyright">
1267 <span style="color:#000000">© <address style="display:inline; font-style:normal;"><a href="https://crossbrowdy.com/" target="_blank">CrossBrowdy</a> API documentation</address> by <a href="https://joanalbamaldonado.com/" target="_blank">Joan Alba Maldonado</a> - <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International</a><br />DocStrap Copyright © 2012-2015 The contributors to the JSDoc3 and DocStrap projects.</span>
1268 </span>
1269
1270<span class="jsdoc-message">
1271 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>
1272
1273 on Wed Mar 22nd 2023
1274
1275 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
1276</span>
1277</footer>
1278
1279<script src="scripts/docstrap.lib.js"></script>
1280<script src="scripts/toc.js"></script>
1281
1282 <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
1283
1284
1285<script>
1286$( function () {
1287 $( "[id*='$']" ).each( function () {
1288 var $this = $( this );
1289
1290 $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
1291 } );
1292
1293 $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
1294 var $this = $( this );
1295
1296 var example = $this.find( "code" );
1297 exampleText = example.html();
1298 var lang = /{@lang (.*?)}/.exec( exampleText );
1299 if ( lang && lang[1] ) {
1300 exampleText = exampleText.replace( lang[0], "" );
1301 example.html( exampleText );
1302 lang = lang[1];
1303 } else {
1304 var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
1305 lang = langClassMatch ? langClassMatch[1] : "javascript";
1306 }
1307
1308 if ( lang ) {
1309
1310 $this
1311 .addClass( "sunlight-highlight-" + lang )
1312 .addClass( "linenums" )
1313 .html( example.html() );
1314
1315 }
1316 } );
1317
1318 Sunlight.highlightAll( {
1319 lineNumbers : true,
1320 showMenu : true,
1321 enableDoclinks : true
1322 } );
1323
1324 $.catchAnchorLinks( {
1325 navbarOffset: 10
1326 } );
1327 $( "#toc" ).toc( {
1328 anchorName : function ( i, heading, prefix ) {
1329 return $( heading ).attr( "id" ) || ( prefix + i );
1330 },
1331 selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
1332 showAndHide : false,
1333 smoothScrolling: true
1334 } );
1335
1336 $( "#main span[id^='toc']" ).addClass( "toc-shim" );
1337 $( '.dropdown-toggle' ).dropdown();
1338
1339 $( "table" ).each( function () {
1340 var $this = $( this );
1341 $this.addClass('table');
1342 } );
1343
1344} );
1345</script>
1346
1347
1348
1349<!--Navigation and Symbol Display-->
1350
1351
1352<!--Google Analytics-->
1353
1354
1355
1356 <script type="text/javascript">
1357 $(document).ready(function() {
1358 SearcherDisplay.init();
1359 });
1360 </script>
1361
1362
1363</body>
1364</html>
\No newline at end of file