[Libwebsockets] pointers for implementing websocket tcp gateway and a static http server
andy at warmcat.com
Wed Oct 12 09:25:34 CEST 2016
On Wed, 2016-10-12 at 09:16 +0200, jsaak wrote:
> I have an app which works under linux/android/ios/osx/windows, and
> TCP/IP to communicate. I want to bundle a websocket to tcp gateway
> the app so i can access it through a browser. Also i want to include
> static http server.
> I found libwebsockets, and i think it might be a solution.
Sounds like the right kind of task for lws.
> All I ask of you is some advice. How to start with libwebsockets? It
> a bit confusing for me.
Run the test server is the best way to get started.
The key question is "How does your existing app wait on network events
at the moment"? It's like poll() or like an event loop?
If it already has its own poll() management, you should look at using
External Poll support to integrate lws with it.
If it uses an event loop, lws has libuv (preferred) and libev event
loop support, you can integrate using that.
How nice a ride you get is mainly depending on the existing app's wait
for network events method.
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
More information about the Libwebsockets