Replies: 11 comments 19 replies
-
It's the first project of websocket webserver I get run successfully after a night, so excited, thanks so much ! so nice ! |
Beta Was this translation helpful? Give feedback.
-
works great |
Beta Was this translation helpful? Give feedback.
-
Thanks for wsServer. I built and have tested with your example on an Intel Phi card. In example, how would you code as echo web socket server? |
Beta Was this translation helpful? Give feedback.
-
Sorry I missed it before. Thanks again for the code.
From: Davidson Francis ***@***.***
Sent: Tuesday, March 22, 2022 8:38 PM
To: Theldus/wsServer
Cc: troglobytor; Comment
Subject: Re: [Theldus/wsServer] Was wsServer helpful to you? tell us a little about it (Discussion #30)
I built and have tested with your example on an Intel Phi card
An Intel Xeon Phi card? Wow, that's very unexpected, but also awesome 😊
In example, how would you code as echo web socket server?
Well, I believe the example file already does that for you... for each message that a client sends, the example will display it on the screen and also send it to all connected clients.
How does this differ from your use case?
—
Reply to this email directly, view it on GitHub <#30 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB3F2LQSFVYXMJNXAXKWRKTVBJYVZANCNFSM5CZ42UYQ> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB3F2LVPTFWGEH5LAKVQ4MTVBJYVZA5CNFSM5CZ42UY2YY3PNVWWK3TUL52HS4DFWFCGS43DOVZXG2LPNZBW63LNMVXHJKTDN5WW2ZLOORPWSZGOAASOR5Y.gif> Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks for providing this tool, it is so simple and smart, and I like it :-) I came across a challenge with the broadcast option in Besides broadcast = true, it needs to populate also a valid file descriptor value, otherwise the broadcast loop will not execute ..?
My current application is a UI for a power meter, and I simply want to send push updates to all connected clients. As a quick and dirty solution I created a new API function ( simply using
This works for me, and I'm fine with that. Suggestions: Best regards |
Beta Was this translation helpful? Give feedback.
-
Just wanted to chime in and say:
And since you were interested, here is a bit more detail: I'm working on a minimalist set of tools that will enable the monitoring of multiple machines in a simple dashboard. For that, I want to have one WebSocket server running on each machine, which accepts a connection from the machine running the dashboard. I would then push updates to the dashboard whenever any of the vitals have changed. The fact that wsServer is written in C, its simplicity, easy setup and the lack of dependencies is what makes it a great fit for me, as some of those machines have very low specs and I can't afford to install much on them. |
Beta Was this translation helpful? Give feedback.
-
Hi We are getting connect() API failed issue with toyws web client and throwing "Unable to connect!" message. We used following steps to setup wsServer
Please suggest me what is worng |
Beta Was this translation helpful? Give feedback.
-
You have no idea how long i've been looking for a code like this 😀. |
Beta Was this translation helpful? Give feedback.
-
Amazing and well written code. |
Beta Was this translation helpful? Give feedback.
-
My project is making an automated system that has status and control messages sent thru websocket to a webpage. I have a semi working prototype using python that is having issues when a client disconnects. I haven't done command line C in decades I am working on a Le Potato AML-S905X-CC with Ubuntu 22.04.1 Jammy LTS. Running headless thru a putty connection. I followed the instructions CMake instructions here, all went well, no errors or complaints. The echo is available as advertised and executable. Execution returns to the ubuntu prompt in about a second. No error message a sub optimal operation. The only clue I have is the system log contains the following: immediately after posting this I saw the echo.html file. Attempting to use this results with the following message: Connection closed: wasClean: false, evCode: 1006. Of coarse I don't think echo is running. |
Beta Was this translation helpful? Give feedback.
-
echo $? yields 0. There are no errors that I can find, it just does nothing... I think the wifi loss is caused by doing a power reset to the board, Wifi stability is not a problem. My python websocket server runs fine. I followed the core dump link provided, I didn't find any core files. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Developing open-source software can be a bit lonely when you (maintainer) don't get feedback about your project... and that's why I created this discussion. Feel free to talk about the project, what was helpful to you, suggestions...
A little about the project:
wsServer was born 7 years ago when I wanted to create a mini checkers game in C + HTML/JS. At that time, I have not found many user-friendly libraries, and I really wanted to focus on game logic, rather than spending much time trying to understand how a library works.
Ironically, this is how wsServer was born: I decided to invest some of my time and implement the minimum necessary to have a websocket server in C to get my little game up and running.
In the beginning, this project was just a baby, and there were a lot of bugs and cases that I hadn't tested. After receiving occasional contributions over the years, I decided to give it a little more love and take the project more seriously, making it more robust and useful to more people.
Currently, the code has grown over 5x more (300 versus 1500 LOC, src/ws.c), supports 4 different OSs (Linux, Windows, macOS, and FreeBSD), and is compliant (or should be) with RFC 6455, but the main ideas remain the same:
However, its simplicity comes with some cost: Not suitable for environments with hundreds or thousands of simultaneous accesses. Despite this, wsServer manages to have very acceptable performance and is on par with other competitors.
What are your thoughts?
Whenever I see a fork, a new issue, or even a PR, I ask myself things like:
Given everything I've said about the project's goals, I'd also like to know:
If you want to discuss a more specific thing, feel free to create an issue as well.
Beta Was this translation helpful? Give feedback.
All reactions