Feeds data continuously to a websocket server. Relies on the POCO library.
cd /tmp
wget http://pocoproject.org/releases/poco-1.6.0/poco-1.6.0.tar.gz
tar -xzvf poco-1.6.0.tar.gz
cd poco-1.6.0
./configure --no-tests --no-samples --prefix=/usr
make -s
sudo make -s install
g++ client.cpp -lPocoNet -o client
This server is configured so that if it gets a message from localhost then it redisributes it immediately to any other connected clients.
client_nopoll.c is another example of a websocket client based on the nopoll library written in pure C.
installing dependency:
sudo apt-get install libssl-dev
Then:
cd /tmp
wget http://www.aspl.es/nopoll/downloads/nopoll-0.2.7.b164.tar.gz
tar -xzvf nopoll-0.2.7.b164.tar.gz
cd nopoll-0.2.7.b164
./configure --prefix=/usr
make
At this point you can navigate to the 'test' directory and run the examples nopoll-regression-listener
and nopoll-regression-client
in separate terminals. If it looks ok, then it only remains to
sudo make install
g++ client_nopoll.c -I/usr/include/nopoll -lnopoll -o client_nopoll
You can test client_nopoll via starting the nopoll-regression-listener
(a server) in the test
folder.