next up previous contents index
Next: Simple Server in C Up: ProcessViewBrowser Previous: Installation   Contents   Index

Server

pvbrowser provides libraries for developing your server.

Figure 3.1: Provided libraries
/usr/lib/libpvsid.so    # for using inetd on linux
/usr/lib/libpvsmt.so    # for using multithreaded server on linux
[.lib]libpvid.olb       # for using inetd on OpenVMS
[.lib]libpvmt.olb       # for using multithreaded server on OpenVMS
.\pvb\bin\serverlib.lib # for using multithreaded server on windows

The provided libraries do not use Qt. They only use standard C routines and thread support. Thus it is possible to develop your server on top of these libraries. Your code will only fall under the license terms of pvbrowser. You need no external software. The functions in the libraries are described in the reference manual which is created form sourcecode using doxygen. In principle most functions from the library will simply write a command to the browser.

Figure 3.2: A typical function
int pvSetGeometry(PARAM *p, int id, int x, int y, int w, int h)
{
char buf[80];

  sprintf(buf,"setGeometry(%d,%d,%d,%d,%d)\n",id,x,y,w,h);
  pvtcpsend(p, buf, strlen(buf));
  return 0;
}

Typical functions offer an interface to your programming language and generate the appropriate commands for pvbrowser. Thus you need not to know the strings pvbrowser is operating on.



Subsections

Rainer Lehrig 2004-02-17