Integration of libcairo in pvbrowser
Backward Content Forward

main

main.png
main()
pvmain.png
pvMain()

In main() of the pvserver, the "Loop" thread is started ( tloop.create(loop, NULL); ). In addition, the command line parameter "-svg" is evaluated. This allows the user to switch between PNG (default) and SVG. The rest of the source code was provided by the pvbrowser framework.

In pvMain(), the client operation starts. pvMain() runs in a thread started in main() with pvCreateThread(). Above pvMain there is a rlThread instance called "tloop", which can be used to synchronize with the "Loop" thread ( tloop.lock(); / tloop.unlock(); ).

In addition to the while(1) loop specified by the pvbrowser framework, in which the pvbrowser masks are called ( show_maskX() ), a check is made to see if a pvbrowser client or a web browser is connected. If it is a "HTTP GET" request, runHttpServer() is called.


Backward Content Forward