Websocket
wsServer
Websocket | wsServer | |
---|---|---|
1 | 1 | |
195 | 402 | |
- | - | |
0.0 | 7.2 | |
8 months ago | 13 days ago | |
C | C | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Websocket
wsServer
-
Libwebsockets
One great feature for me was being able to accept both WebSocket as well as raw TCP connections on the same port using libwebsockets, this is extremely easy and just required settings the flag LWS_SERVER_OPTION_FALLBACK_TO_RAW.
I encountered other hiccups. They are fully documented and completely valid, but were really confusing to me as a first-time user:
* Sending data requires a specific memory layout[2] – namely having to allocate memory for the websocket header youself before the actual message you want to send. This gave me confusing segfaults in the beginning.
* Sending data / responding to a client message will probably (but not always) fail when just naively using "lws_write()". To correctly send data you need to manually queue your message data, request the "ON_WRITABLE" callback[3] and only then actually send.
[1]: https://github.com/Theldus/wsServer
What are some alternatives?
iwnet - Pure C Asynchronous HTTP/IO framework providing websockets, SSL, routing, reverse proxy.
libcurl - A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features
ulfius - Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services
cosmopolitan - build-once run-anywhere c library
jsvar - JSVAR - a C library for web GUIs with websockets.
facil.io - Your high performance web application C framework
MinnowServer - A super small and fast embedded HTTP(S) WebSocket server
libwebsockets - canonical libwebsockets.org networking library