Pierre Fersing
408972ddc1
Fix two issues with Websocket ( #472 )
...
* Websocket were always marked as "want_write" (even if they only
want to read, or worse want nothing).
* Websocket FD was read twice in some case (when socket recv queue was
larger that size read by libwebsocket)
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
2017-06-23 22:30:57 +01:00
Roger A. Light
c78678607d
[427] Fix large retained messages over websockets.
...
Thanks to Brian Block.
Bug: https://github.com/eclipse/mosquitto/issues/427
2017-06-19 21:40:19 +01:00
Roger A. Light
c07ba2a3da
Experimental fix for poor websockets performance.
2017-06-18 12:52:59 +01:00
Roger A. Light
2c92d3b837
More file closing fixes.
2017-02-20 23:48:30 +00:00
Roger A. Light
e7c1507f88
Fix error message when websockets http_dir directory does not exist.
2017-02-20 23:48:30 +00:00
Roger A. Light
b01e32bd8b
[354] Close http files even on bad clients.
...
Thanks to jbwdevries.
Bug: https://github.com/eclipse/mosquitto/issues/354
2017-02-20 23:48:30 +00:00
tucic
9f743d5972
Maximum connections for websockets listener ( #271 )
...
Check current number of connections before accepting new websockets clients.
Signed-off-by: tucic <tucic.milan@gmail.com>
2017-02-20 23:48:30 +00:00
Karl Palsson
20197e2496
websockets: fix compatibility with older lws versions ( #260 )
...
In 1.3, 1.4 and 1.5, the function was "libwebsockets_get_protocol" not
"libwebsocket_get_protocol" While the #define name doesn't matter on
newer libwebsockets, where it redirects to lws_get_protocol, the naming
is critical for older versions.
Fixes: 477cd3e399
(Fix missing context->listener for websocket client)
Signed-off-by: Karl Palsson <karlp@etactica.com>
2017-02-20 23:48:30 +00:00
Pierre Fersing
477cd3e399
Fix missing context->listener for websocket client ( #239 )
...
The context associated with websocket client didn't had listener
filled, which caused use_username_as_clientid to be ignored.
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
2016-08-16 22:10:41 +01:00
Roger A. Light
63416e6547
;
2016-06-06 16:03:24 +01:00
Roger A. Light
5d96c3d7ba
[186] Fix TLS operation with websockets listeners and libwebsockts 2.x.
...
Bug: https://github.com/eclipse/mosquitto/issues/186
2016-06-06 15:53:05 +01:00
Roger A. Light
7761218d3c
[170] Fix WS listeners not being able to bind to an IP.
...
Closes #170 . Thanks to minghuadev.
Bug: https://github.com/eclipse/mosquitto/issues/170
2016-05-26 09:21:15 +01:00
Roger A. Light
a79412e3d8
Fix compile error from library keepalive handling.
2016-03-06 19:49:20 +00:00
Roger A. Light
d9142c3974
[476314] Deliver queued WS client msgs on reconnect.
...
Thanks to Joking Young and Christoph Krey.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=476314
2016-03-05 22:31:52 +00:00
Roger A. Light
51f275bd02
Error messages for websockets init failure.
2016-01-07 21:56:16 +00:00
Roger A. Light
2549919413
Fix support for libwebsockets 1.22.
2015-12-21 11:32:02 +00:00
Roger A. Light
7aa653c42f
Add support for libwebsockets 1.6.
2015-12-19 01:21:17 +00:00
Roger A. Light
201bb1a04a
Fix potential crash on libwebsockets error.
2015-08-18 23:33:55 +01:00
Roger A. Light
6f2fe06f0b
[464811] Fix handling of payload lengths>4096 with websockets.
...
Thanks to Arjen van Elteren and Stephen Zeng.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464811
2015-05-06 16:40:10 -05:00
Roger A. Light
35b729909c
[463241] Fix possible crash under heavy network load.
...
Thanks to Alexandre Zia.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463241
2015-03-27 01:07:48 +00:00
Roger A. Light
3a36ae843b
Fix lws 1.3 detection.
2015-02-23 15:20:23 +00:00
Roger A. Light
ff9c2087b1
Basic support for libwebsockets 1.2.x.
2015-02-16 22:02:34 +00:00
Roger A. Light
2098d6a392
Remove debug line.
2015-02-15 20:10:46 +00:00
Roger A. Light
db86809ee9
Add websockets logging options.
2015-02-13 22:57:49 +00:00
Roger A. Light
3ed5c94038
Struct optimisations.
2015-02-13 21:17:11 +00:00
Roger A. Light
e3bf10cd9a
Change the way that new clients with match client ids are dealt with.
...
This change means that the connection isn't swapped from new context to
old, which makes dealing with websockets lots easier. It does require
that clients storing a list of their subscriptons.
2014-10-12 11:38:21 +01:00
Roger A. Light
950c4ed9c6
Check return value of fseek for errors.
2014-09-23 00:45:12 +01:00
Roger A. Light
aa2e6a8d29
Fix possible NULL derefence.
2014-09-23 00:35:51 +01:00
Roger A. Light
e561b5ea08
Windows fix.
2014-09-19 10:43:14 +01:00
Roger A. Light
58a7565a2b
Check http request directories on Windows.
2014-09-17 23:14:22 +01:00
Roger A. Light
65526d2746
No need to call lws_partial_buffered() here. It is never set at the start of a callback.
2014-09-17 22:27:18 +01:00
Roger A. Light
f61a8cbf74
Get address for websockets clients.
2014-09-17 22:19:45 +01:00
Roger A. Light
91fa1c9625
Disable ipv6 websockets.
2014-09-17 21:55:02 +01:00
Roger A. Light
3d58f5ed82
Some minor memory leak fixes.
2014-09-17 21:50:08 +01:00
Roger A. Light
dd36c4b273
Don't attempt to find real path of NULL.
2014-09-15 21:43:44 +01:00
Roger A. Light
3c5ca95c81
File serving from http on *nix.
2014-09-08 23:25:02 +01:00
Roger A. Light
b84ca80052
Skeleton callback_http() function.
2014-09-08 18:39:51 +01:00
Roger A. Light
f500ff78b8
no_buffer_all_partial_tx not in latest LWS.
2014-09-08 18:24:12 +01:00
Roger A. Light
c4e7233159
Add http_dir option (not yet used).
2014-09-08 18:21:53 +01:00
Roger A. Light
6af0c236e8
Each listener requires its own copy of the protocols struct.
2014-07-28 14:14:36 +01:00
Roger A. Light
9bb336bbf3
Use do_disconnect() for websockets.
2014-07-08 23:18:11 +01:00
Roger A. Light
3fd1dc477f
Fix defects identified by Coverity.
2014-07-03 21:55:25 +01:00
Roger A. Light
5ac576f2ab
Request write callback if there is still more to send.
2014-07-03 18:48:40 +01:00
Roger A. Light
399453837d
Log websockets listeners being opened.
2014-07-03 11:32:29 +01:00
Roger A. Light
13f94f3511
More reconnect fixes.
2014-07-03 01:00:57 +01:00
Roger A. Light
d75903b0ae
Fix reconnect support for websockets.
2014-06-30 23:30:43 +01:00
Roger A. Light
bdb3e74100
More memory fixes.
2014-06-29 23:16:10 +01:00
Roger A. Light
7f18ced0b4
Close websockets connection if we are set to disconnecting.
2014-06-26 22:13:22 +01:00
Roger A. Light
3577dbf332
Add sock hash earlier to avoid crashes.
2014-06-23 23:47:48 +01:00
Roger A. Light
0fc0e13a8f
Can't access mosq after free.
2014-06-23 18:44:42 +01:00