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

Linking libwebsockets library

I have searched alot but didn't find anything reasonable to me. I want to link https://libwebsockets.org to a C program. I have tried using builds available here https://ci.appveyor.com/project/lws-team/libwebsockets but those were giving errors…
Tim Paine
  • 11
  • 5
0
votes
0 answers

libwebsocket doesn't send packet on established connection

I'm developing a simple websocket server using the libwebsockets library on Linux machine. I'd like to send to client just connected a command. If I use lws_write I receive a back-to-back error, as reported from the manual. If I use…
SteMMo
  • 392
  • 1
  • 4
  • 23
0
votes
1 answer

(libwebsocket) How to sent a packet on client connection

I'm developing a simple websocket server on Linux using libwebsocket lib. I need to send an init packet on established event for every client connection. If I use memcpy( p, "init", 4); lws_write(wsi, p, 4, LWS_WRITE_TEXT); in case…
SteMMo
  • 392
  • 1
  • 4
  • 23
0
votes
1 answer

libwebsockets libuv error: ‘m’ may be used uninitialized in this function

I cross compiled libuv successfully and I'm trying to cross compile libwebsockets but I get the following error in make for arm with a buildroot toolchain. Please advise. libwebsockets cmake .. \ …
MLB
  • 1
  • 2
0
votes
0 answers

Llibwebsockets built with cmake generates errors

I want to use libwebsockets library bt while building it using cmake it gives error as shown in the following image: The other error which is cut in above image is: C:/Program Files (x86)/CMake/share/cmake-3.11/Modules/FindOpenSSL.cmake:390…
user9703977
0
votes
0 answers

C# ClientWebsocket throwing Exception on incoming binary message

I implemented a websocket-client using System.Net.WebSockets to communicate with an embedded device. On the device the libwebsocket library is in use. The main part of the protocol is implemented using JSON strings, which works perfectly but some…
Guthni
  • 1
  • 1
0
votes
1 answer

Error in retrieving data using Web Socket Client API

I am trying to make a connection using Web sockets Client API. For making the connection, a "Play Session" cookie needs to be passed for verifying the user. Following is my code: async def streaming_data(url, play_session): try: async…
0
votes
1 answer

websocket is connection local

I'm writing a website where the server is on a pi running a C program using libwebsockets. I'm wondering if it's possible to determine if the host is local (connected from LAN) or remote (from WAN). I'd like to limit what the web page can do if…
user2766918
  • 574
  • 4
  • 17
0
votes
1 answer

libwebsockets: which library does the type Client belong to?

I am currently building a WebSocket server and I came across the following code to handle fragmented messages (from libwebsockets): case LWS_CALLBACK_RECEIVE: { Client * const client = (Client *)user; const size_t remaining =…
Ronnie
  • 69
  • 1
  • 7
0
votes
1 answer

multi client libwebsockets server

I've used libwebsockets to develop a server that enable to use a simple linux terminal through a web page. Now i need to edit my code so that the server accept multiple clients. I didn't really understood how this library manage the structs to store…
0
votes
1 answer

janus gateway: configure shows websockets not enabled

I am trying to use janus. First step, installation. I followed the instructions here. All is well. However, when I run configure prefix=/opt/janus Relevant portions of the output are: ... checking for TRANSPORTS... yes checking for MHD...…
Sunny
  • 9,245
  • 10
  • 49
  • 79
0
votes
0 answers

Circular dependency libwebp

trying to fix and old ios application which made by objective-c. However, whenever I try to $ pod install it gives that dependency error below and I couldn't find anything about it. Re-creating CocoaPods due to major version update. Analyzing…
b166er
  • 19
  • 5
0
votes
1 answer

Unable to compile libwebsockets using CMake?

Here is the cmake configuration that i am using cmake_minimum_required (VERSION 3.0) project (Project) set (CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -O0 -DDEBUG -g") set (CMAKE_C_FLAGS_DEBUG "-std=c++11 -O0 -DDEBUG -g") set (CMAKE_CXX_FLAGS_RELEASE…
georoot
  • 3,557
  • 1
  • 30
  • 59
0
votes
1 answer

lws_context_destroy causes segmentation fault, how to fix it?

It shows in my multi-thread program: I starts about 300 thread to connect a game server using Websocket(libwebsockets), the main loop is: step 1 create a new context of websocket step 2 connect with server using websocket setp 3 destroy context…
moosedong
  • 21
  • 1
0
votes
0 answers

Libwesocket Client + Server all in one

I'am curently building a C Tasker, the goal of the program is to connect to a Main Server via Websockets and keep the connection Alive(Client Watchdog) as long as it is possible. In the mean time the Tasker should be able to receive Jsons from…
Hakeem El Bakka-lee
  • 756
  • 1
  • 7
  • 23