[Cppcms-users] (no subject)
Brought to you by:
artyom-beilis
From: eric m. <mid...@gm...> - 2014-02-20 04:12:29
|
Hello, I am looking for a way to update parts of a webpage via events from the server. I downloaded the Ticker example from the blog but as I try to compile it (os = Ubuntu) I'm getting the following errors: g++ -std=c++0x -O2 -Wall -g ticker.cpp -o ticker -lcppcms -lbooster ticker.cpp: In member function 'void ticker::async_send(booster::shared_ptr<cppcms::http::context>)': ticker.cpp:83:39: error: capture of non-variable 'ticker::counter_' ticker.cpp:97:9: note: 'int ticker::counter_' declared here I also downloaded the Sse Ticker example from contrib and that does compile but when I run it and access the page from firefox (127.0.0.1:8080/ticker), I get a 404 Not Found and a popup with the following information: ------------------------------------------------------- ticker which is: text/event-stream from: http://127.0.0.1:8080 What should firefox do with this file? - Open with Browse - Save File -------------------------------------------------------- It doesn't display the tickers on the webpage. I have a camera that is shooting photographs and want a webpage to reflect what the camera is doing. So every time it shoots a photograph the webserver should send the filename and sequencenumber of that photograph to the webpage and the user must be able to inform the camera to stop taking pictures via pressing a button. So HTTP requests to control the camera and asynchronous status-updates to be displayed on the webpage. I hope someone can help me out by either getting one of the ticker examples working or providing another working example. Many thanks! Eric <http://www.lightandmagicphotography.com> |