1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/lib
Andy Green 6f520a5195 evict all broadcast support
Libwebsockets is fundamentally singlethreaded... the existence of the
fork and broadcast support, especially in the sample server is
giving the wrong idea about how to use it.

This replaces broadcast in the sample server with
libwebsocket_callback_on_writable_all_protocol().  The whole idea of
'broadcast' is removed.

All of the broadcast proxy stuff is removed: data must now be sent
from the callback only.  Doing othherwise is not reliable since the
service loop may close the socket and free the wsi at any time,
invalidating a wsi pointer held by another thread (don't do that!)

Likewise the confirm_legit_wsi api added recently does not help the
other thread case, since if the wsi has been freed dereferencing the
wsi to study if it is legit or not will segfault in that case.  So
this is removed too.

The overall effect is to push user code to only operate inside the
protocol callbacks or external poll loops, ie, single thread context.

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-29 22:13:55 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
base64-decode.c introduce logging api and convert all library output to use it 2013-01-10 22:16:37 +08:00
client-handshake.c FreeBSD compatibility 2013-01-29 06:57:21 +08:00
client-parser.c unionize mutually exclusive wsi members 2013-01-21 11:06:34 +08:00
client.c evict all broadcast support 2013-01-29 22:13:55 +08:00
daemonize.c trac 5 sa_restorer deprecated 2013-01-23 08:32:03 +08:00
extension-deflate-frame.c unionize mutually exclusive wsi members 2013-01-21 11:06:34 +08:00
extension-deflate-frame.h Separate compression levels for server and client, 2013-01-10 12:45:54 +08:00
extension-deflate-stream.c introduce logging api and convert all library output to use it 2013-01-10 22:16:37 +08:00
extension-deflate-stream.h Fixed deflate-stream extension. 2013-01-09 18:17:42 +08:00
extension.c deprecate x google mux 2013-01-17 19:53:16 +08:00
getifaddrs.c introduce getifaddrs for toolchains without it 2013-01-12 20:39:47 +08:00
getifaddrs.h introduce getifaddrs for toolchains without it 2013-01-12 20:39:47 +08:00
handshake.c unionize mutually exclusive wsi members 2013-01-21 11:06:34 +08:00
libwebsockets.c evict all broadcast support 2013-01-29 22:13:55 +08:00
libwebsockets.h evict all broadcast support 2013-01-29 22:13:55 +08:00
Makefile.am trac 3 document write and context_user 2013-01-22 23:09:01 +08:00
minilex.c add lexical parser for headers 2013-01-18 01:55:48 +08:00
output.c evict all broadcast support 2013-01-29 22:13:55 +08:00
parsers.c unionize mutually exclusive wsi members 2013-01-21 11:06:34 +08:00
private-libwebsockets.h evict all broadcast support 2013-01-29 22:13:55 +08:00
server-handshake.c unionize mutually exclusive wsi members 2013-01-21 11:06:34 +08:00
server.c evict all broadcast support 2013-01-29 22:13:55 +08:00
sha-1.c Static variable is now const. 2013-01-09 15:14:31 +08:00