Luigi Pinca
2862c2fef1
[doc] Add error handlers to examples and code snippets
...
Closes #2112
2023-01-23 22:20:23 +01:00
Luigi Pinca
d062ded622
[example] Fix require path
2022-04-15 13:10:21 +02:00
Luigi Pinca
2cf6202f8a
[example] Use the WebSocket.WebSocket{,Server} aliases
...
Closes #2034
2022-04-12 21:39:04 +02:00
Luigi Pinca
7f0b5c42bb
[example] Update uuid to version 8.3.2
2021-08-09 08:56:18 +02:00
Luigi Pinca
e173423c18
[major] Do not decode Buffers to strings
...
Avoid decoding text messages and close reasons to strings. Pass them as
`Buffer`s to the listeners of their respective events. Also, make
listeners of the `'message'` event take a boolean argument to speficy
whether or not the message is binary.
Refs: https://github.com/websockets/ws/issues/1878
Refs: https://github.com/websockets/ws/issues/1804
2021-07-14 21:26:04 +02:00
Eugene Maslovich
d972c33cb4
[example] Write 401 response before destroying the socket ( #1798 )
2020-09-17 07:48:21 +02:00
Luigi Pinca
88d0345997
[pkg] Update prettier to version 2.0.5
2020-06-13 08:51:03 +02:00
Luigi Pinca
a6c42383d6
[example] Close the WebSocket connection on logout
...
Fixes #1653
2019-10-19 15:46:32 +02:00
Luigi Pinca
fa991731cc
[doc] Fix nits
2019-08-05 15:33:39 +02:00
Adrian Hope-Bailie
0a612364e6
[doc] Discourage use of verifyClient hook ( #1613 )
2019-08-04 21:13:09 +02:00
Luigi Pinca
aca3858069
[example] Clean up examples
2019-04-25 19:46:55 +02:00
Luigi Pinca
4a9a7732eb
[example] Rename serverstats to server-stats
2019-04-25 18:04:07 +02:00
Luigi Pinca
3eff077ce8
[example] Remove unmaintained fileapi example
2019-04-25 17:19:48 +02:00
Luigi Pinca
379def63c8
[lint] enable no-var rule
2019-04-25 17:14:46 +02:00
Luigi Pinca
b9fad73f53
[lint] Use prettier
2018-11-17 09:39:58 +01:00
Luigi Pinca
19a0225062
[lint] Add missing spaces
2018-08-29 10:01:49 +02:00
Luigi Pinca
d963003a40
[example] Update dependencies
2018-07-20 07:45:00 +02:00
Luigi Pinca
8c02d92341
[example] Refactor SSL example
2017-06-10 10:22:21 +02:00
Luigi Pinca
d2c848120f
[major] Remove the upgradeReq property ( #1104 )
...
The `http.IncomingMessage` object, instead of being attached to the
`WebSocket` object, is passes as the second argument to the
`connection` event.
2017-05-17 07:23:21 +02:00
Luigi Pinca
c15118f063
[major] Remove the flags argument ( #1101 )
...
The `flags` object specifies whether the received data is binary or not
and whether it was masked or not. This object is actually redundant and
therefore removed in this commit as the spec requires client-sent
frames to be masked and server-sent frame to be unmasked.
The `typeof` operator can be used to check whether the received data is
binary or not.
2017-05-17 07:23:21 +02:00
Luigi Pinca
e057bfc827
[example] Avoid using deprecated APIs
2017-03-08 14:31:54 +01:00
Vasily Loginov
72cf8bee2d
[example] Add Express session parsing example
2017-02-14 12:37:11 +01:00
Danny Ho
8aa65e2f4d
[example] Update serverstats example to work with Express 4 ( #954 )
2017-01-05 07:31:41 +01:00
Luigi Pinca
323db27415
[example] Update express to version 4.14.0
2017-01-04 14:59:51 +01:00
Danny Ho
55843a9c0a
[example] Update fileapi example to work with Express 4 ( #953 )
2017-01-04 12:36:29 +01:00
Luigi Pinca
bf8ab467fe
[list] Fix remaining lint issues on examples/*
2016-10-26 18:46:03 +02:00
Luigi Pinca
7214fc0b72
[lint] Run eslint --fix on examples/*
2016-10-26 18:09:55 +02:00
Felix Rabe
fba7759e99
Semicolon
2014-08-18 00:57:03 +02:00
João Jerónimo
ea47c1f3bd
missing semi colon
2013-04-30 17:03:26 +02:00
Anton Kudris
b838d6c9da
simple example of running websockets over SSL
2013-04-23 18:03:15 +04:00
Farrin Reid
cb8ef271aa
[fix] path.exists was moved to fs.exists
2012-07-07 05:34:24 -08:00
einaros
c16ad34172
update serverstats example to show that write errors can be ignored
2012-06-14 13:51:56 +02:00
einaros
b5eca5b6f9
add example of use with express 3
2012-06-14 13:21:11 +02:00
einaros
34e16ee7a1
make serverstats example work with firefox
2012-06-14 11:11:09 +02:00
einaros
8b5799f719
updated serverstats example to work with node 0.7+
2012-06-14 10:46:33 +02:00
einaros
21b04f2729
corrected serverstats example
2012-05-19 12:20:02 +02:00
einaros
2dd1c1ca9b
fix fileapi example
2012-05-10 21:24:45 +02:00
Slavomir Kaslev
84c526fcaa
Fixed the examples to work with the latest express version.
2012-04-15 23:44:50 +03:00
Einar Otto Stangvik
ab0b1633c7
updated fileapi example server to work with windows paths
2012-02-10 10:24:56 +01:00
einaros
7bd0af5c5a
updated file upload examples with bandwidth sampling per websocket client
2012-02-09 22:36:58 +01:00
einaros
797b21dd5b
corrected refactoring issue in example
2012-02-09 14:28:57 +01:00
Einar Otto Stangvik
6aab33fdd6
refactored fileapi/server.js
2012-02-09 13:29:43 +01:00
einaros
98b00e44c4
added fileapi / file sending example
2012-02-09 12:35:06 +01:00
einaros
1fae8b853a
updated package
2012-02-07 10:31:25 +01:00
einaros
eed413f685
added browser-based example
2012-02-07 10:28:49 +01:00