Netgear / simple-libwebsockets-example

Simple libwebsockets Example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple-libwebsockets-example

A simple libwebsockets example.

Like http://ahoj.io/libwebsockets-simple-websocket-server I found the libwebsockets examples here https://github.com/warmcat/libwebsockets/blob/master/test-server too complicated.

I wanted to be able to serve a simple html file and also have a C client send some data to the server so created this.

Build

make

Run

In one terminal run:

./server

In another terminal run:

./client

Then navigate to localhost:8000 in your web browser. You should see a random number being updated every second.

About

Simple libwebsockets Example


Languages

Language:C 83.7%Language:HTML 11.0%Language:Makefile 5.2%