mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
No description
![]() So far agreeable protocol names were limited to what struct libwebsocket_protocols had to offer. With the wildcard matching of protocol name in an earlier commit, FILTER_PROTOCOL_CONNECTION can now inspect and parse the WSI_TOKEN_PROTOCOL header, and explicitly set a protocol by calling libwebsocket_set_protocol(wsi, name, <optional struct libwebsocket_protocols *>) The Sec-WebSocket-Protocol: reply will contain only the default or matched protocol name as selected in FILTER_PROTOCOL_CONNECTION. The current protocol name can be accessed via const char *libwebsockets_get_protocol_name(struct libwebsocket *wsi). A LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION callback would do roughly this: lws_hdr_copy(wsi, protocols, sizeof protocols, WSI_TOKEN_PROTOCOL); ..inspect protocols and choose a proto name and struct libwebsocket_protocols: ..call libwebsocket_set_protocol(wsi,name, <opt proto if not default>); Also deals with issue #147 (incorrect Sec-WebSocket-Protocol: reply). |
||
---|---|---|
cmake | ||
lib | ||
scripts | ||
test-server | ||
win32port | ||
.gitignore | ||
Android.mk | ||
changelog | ||
CMakeLists.txt | ||
config.h.cmake | ||
cross-arm-linux-gnueabihf.cmake | ||
cross-ming.cmake | ||
cross-openwrt-makefile | ||
libwebsockets-api-doc.html | ||
libwebsockets.spec | ||
LICENSE | ||
README | ||
README.build | ||
README.coding | ||
README.test-apps |
This is the libwebsockets C library for lightweight websocket clients and servers. For support, visit http://libwebsockets.org and consider joining the project mailing list at http://ml.libwebsockets.org/mailman/listinfo/libwebsockets You can get the latest version of the library from git http://git.libwebsockets.org https://github.com/warmcat/libwebsockets for more information: README.build - information on building the library README.coding - information for writing code using the library README.test-apps - information about the test apps built with the library