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
0
votes
0 answers

LibWebSockets - Client access to Server Cookies (i.e. set-cookie headers)

I have an HTTP server which is returning a response with set-cookie headers and a redirect. I've written a client using libwebsocket v3.2.3 and I don't see how I'm supposed to fetch the cookie(s) sent by the server. I've tried the following code to…
GroovyDotCom
  • 1,304
  • 2
  • 15
  • 29
0
votes
1 answer

Is there any way to close idle socket.io connections for too long?

Is there any way to close idle socket.io connections ? or I need to track from my client side. My socket.io version is 4.4.1
helloindia
  • 62
  • 8
0
votes
1 answer

Libwebsockets: keep SSL context disabled and provide one from the modem

I've recently been passed an embedded project where an MCU uses libwebsockets (version 3.1.0) to setup a websockets client. The MCU is connected to a SIMCOM modem for 4g connectivity. Up until now the communication was non-secured: SSL context not…
SteC
  • 1
  • 2
0
votes
1 answer

how to enable gzip compression in libwebsocket on ESP32

I am running a webserver on an ESP32 chip using the libwebsocket library. The server files are in a ROMFS partition on the ESP32. Currently I am in the process of trying to improve the loading time by concatenating, minifying and compressing the…
Tom
  • 1
  • 2
0
votes
1 answer

libwebsockets single thread http server multiple requests handling

I built a single thread http server using lws on embedded linux. When a request is received, while previous one is being processed, it starts processing the second one BEFORE the first is finished. Here are the logs while handling simple GET: Test…
JWZ1996
  • 77
  • 9
0
votes
1 answer

How to convert an short to unsigned char *buf in C?

How to convert an short to unsigned char *buf in C ? I read my data short read_raw_data(int addr) { short high_byte, low_byte, value; high_byte = wiringPiI2CReadReg8(fd, addr); low_byte = wiringPiI2CReadReg8(fd, addr + 1); value =…
hannes ach
  • 16,247
  • 7
  • 61
  • 84
0
votes
0 answers

Libwebsockets -- valgrind -- says I am branching off of an unitialized variable

Been running valgrind on my code the last few days and one that I can not figure out is on the first write to libwebsockets and only the first write valgrind gives me this cryptic branching off of uninitialized variable. After the first write…
tbandtg
  • 9
  • 2
0
votes
0 answers

How to add or start libwebsockets with SSL in UE4 .24 (html5 ue4 from source)

I have nice working whole multiplatforms builds for client part but my dedicated server don't accept https/SSL i can run it only for http protocol on my public server (centOS8.3) . need to use SSL on dedicated server centos 8.3 . My host mashine is…
Nikola Lukic
  • 4,001
  • 6
  • 44
  • 75
0
votes
1 answer

How to change libwebsockets color scheme

I am using libwebsockets library. This exposes certain methods for writing into a log file. lwsl_warn(...), lwsl_err(...) and lwsl_err(...) to name the most common. The output is color coded using ANSI sequences. Is there a way to set the default…
Martin Vana
  • 151
  • 1
  • 8
0
votes
1 answer

field ‘ctx’ has incomplete type error when cross compiling libwebsockets

I'm trying to cross compile libwebsockets for arm. I put OpenSSL and Zlib path in CMakefiles.txt. But after command "make", it makes error. OpenSSL and Zlib path setting in CMakefiles.txt SET(ZLIB_INCLUDE_DIR…
Jacob
  • 67
  • 6
0
votes
1 answer

Where is struct lws_context defined?

I am new to libwebsocket and I have code to analyse. I could not find where is struct lws_context defined. Can any one help me.
PMJ
  • 21
  • 4
0
votes
2 answers

How to deliver websocket traffic from GCP load balancer to websocket server

currently my websocket traffic is delivering from gcp load balancer to nginx to websocket server. am planning to remove one hop so that if i remove nginx. Then how to configure my websocket port (Reserved port) to gcp load balancer so that my…
0
votes
1 answer

lws-client for ATMEL SAM4E

I have generated libwebsockets.a for atmel sam4e (lib, includes) I need help to just run a simple libwebsockets client for atmel SAM4E. I got this error in relation with esp32. but i have compiled my libwebsockets for atmel !! In file included from…
user4371744
0
votes
0 answers

libwebsockets: messages pending

In my use case my messages are small but there are many and they come very fast. Some times my application has to respond. However, I want it to respond only if it has processed all the messages that it has received. I receive messages in the…
xolok
  • 1
0
votes
1 answer

Need help in validating suggesting the design for a poker game

I'm developing fully decentralized poker game. At the moment my current design is I'm using pub/sub, push/pull sockets using the nano sockets to establish the communication. Players push the data using nn_push socket type, dealer receives the data…
sg777
  • 159
  • 6