Questions tagged [libwebsockets]

Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources and to provide fast throughput in both directions.

Libwebsocket is a lightweight pure library built to use minimal CPU and memory resources and to provide fast throughput in both directions. It provides server and client APIs for v13 protocol, along with / serving. It can be configured to use or CyaSSL to provide fully encrypted client and server links including client certificate support.

Architectural features like zero-copy for payload data and FSM-based protocol parsers make it ideal for realtime operation on resource-constrained devices. Moreover, its -clean, reliable and robust. It's licensed under LGPL2 +.

You should use this tag if your question is related with Libwebsocket library or its APIs.

161 questions
1
vote
0 answers

Clients break upon libwebsockets version upgrade

For about six months now I have been running a series of libwebsockets clients which connect to various services. All run relatively smoothly. I've been running a libwebsockets at a git commit in the 2.x line between official releases: afafc13. The…
QED
  • 9,803
  • 7
  • 50
  • 87
1
vote
2 answers

Building libwebsockets library with MinGW

I'm trying to build libwebsockets library using minGW by following the steps available at https://github.com/warmcat/libwebsockets/blob/master/READMEs/README.build.md under the section @section cmwmgw Building on Windows (MinGW) I'm doing cmake -G…
Tim Paine
  • 11
  • 5
1
vote
1 answer

Using the Watson SDK To Do Continuous Speech To Text

I have previously been using the IBM Watson speech to text service to transcribe full audio files that have been pre-recorded. However, I am now trying to do live transcription while using the speaker identification feature. This means that I cannot…
Tim
  • 21
  • 5
1
vote
2 answers

libwebsockets user pointer in client callback

I'm developing a client using the venereable libwebsockets library. I don't know where to assign a char * (somewhere during setup I presume) I have so that I can get my hands on the same via the void *user parameter in my client's…
QED
  • 9,803
  • 7
  • 50
  • 87
1
vote
1 answer

Building cross-compiled ARM files for libwebsockets, in addition to GCC files

I am implementing a web server using libwebsockets (LWS) for an embedded ARM processor. I am testing the server on gcc in Ubuntu as I learn about LWS. I have the server working as a gcc build, but now want to build the cross-compiled version for the…
Gordon
  • 317
  • 1
  • 17
1
vote
0 answers

libwebsockets: How to download files from http server using libwebsocket client

I'm doing a project on ARM platform (Linux Kernel), where I need to code a firmware autoupdate task in C. In order to that, I need to download the manifest file from the FTP/HTTP server and from the manifest file, I'll have link to download the…
Venky
  • 11
  • 2
1
vote
0 answers

net::ERR_EMPTY_RESPONSE when establish websocket connection

I run a websocket server on machine and connect to websocket server like this: var websocket = new WebSocket("ws://127.0.0.1:8989"); websocket.onopen = function (event) { console.log("onopen"); }; websocket.onerror = function (error) { …
pain
  • 319
  • 2
  • 4
  • 18
1
vote
1 answer

Connecting libwebsockets client to rails server with Action Cable

I have a web server running on ruby on rails 5 with action cable and want to use a libwebsockets client to connect to the server. I am unable to get the client to connect successfully to the server with action cable. The libwebsockets client never…
1
vote
1 answer

How to communicate between a libwebsockets client and a websocket server like Nginx?

I try to implement a websocket client (with libwebsockets in C and it's not an option). As example, i used the test-client.c given with the library. My websocket-client actualy works fine with the test-server.c . But i experienced some…
1
vote
1 answer

How to enable debug logging with Libwebsockets?

I'm trying to implement a websocket client (with libwebsockets in C). I'm using cmake to control the software compilation process. My question is simple : How to enable debug logging with Libwebsockets ? First i compiled and installed libwebsockets…
Loïc Guzzetta
  • 128
  • 1
  • 13
1
vote
2 answers

CMake Error: Could Not Find OpenSSL

My Objective: I'm trying to configure Mosquitto broker to use websockets. The Warnings and Errors: https://docs.google.com/document/d/1HJ75NO1wBsnNfFFszeXP4p8re7m4gTE_CMbFoSswJJs/edit?usp=sharing Software: Windows 10 x64 libwebsockets-master Cmake…
Jnr
  • 1,504
  • 2
  • 21
  • 36
1
vote
2 answers

libwebsocket: How to disconnect client if there is no server response for a while (with timeout)?

I have a client using libwebsocket to establish a connection to a server. Whenever the client sends a request, the server sends a response and after receiving the response the client closes the connection. Works fine. But when the server does not…
Farley
  • 179
  • 1
  • 13
1
vote
0 answers

How to pass global user defined structures to each callbacks libwebsockets C

im not sure if this related to lws but i just can't find way to pass global structure which holds its values between the callbacks . the simple story is that i have simple hashtable in…
user63898
  • 29,839
  • 85
  • 272
  • 514
1
vote
1 answer

Implement WebSocket and LWSWS servers in same executable with libwebsockets

I'm trying to create a Web Socket server and a LWSWS web server provided in libwebsockets v2.0. I just need a simple web server to provide HTML/JS/CSS content to the browser and a web sockets server to work with the Web front-end. The only doc…
A. Gille
  • 912
  • 6
  • 23
1
vote
0 answers

Unable to communicate between libwebsocket as client and socket.io as server

This is client code by using libwebsocket version 1.5 #include #include #include #include #include #include #include #include #include…