• About

  • Download

  • Documentation

  • CGI Utils

  • Bugs

  • Forum

  • Development

  • Mailing Lists

  • Authors

    Special thanks to SourceForge™ for sponsoring us with free hosting

    SourceForge Logo
  • CGI Utils Library

    CGI Utils library is very simple so you can see it capabilities in examples. It consists of two packages cgi and template.CGI package is just a simple class CGI wrapping the CGI protocol.Template provides a simple way to work with templates.An example of template is in class aa.tmpl

    From version 1.3.0 sessions are supported.Sessions are hashes of strings. Sessions stored in shared memory with default key ftok("/tmp/session",57)
    By default maximum number of sessions is set to 512 and maximum session size is set to 2048 bytes.Sessions stored as hash each session identified by SID - session id that can be obtained by getUniqueId().
    This functions returns a pointer to buffer containing sid(8-byte length string of letters and numbers).
    It uses static internal buffer so do not use use it in multy-threaded environment.Class Session is used to operate with sessions . You can get existed session by calling getSession(const char *sid,Session &s)
    ,also you can add new or update existed session with addSession(const char *sid,Session &s) call.Sessions are expire.At the time cleanup strategy do not guarantee what session wil be removed after expire period.Cleaning up called only when maximum number of sessions acchieved. Session have next methods : string &get(key) and set(key,val) also time_t getTouched() method provided . It returns last time the session was touched . Also method provided that could be usefull: destroy() destroy sessions.It will actually be destroyed when all processes detaches from sessions. getInfo(int &nsessions,int &seed,vector &sids,vector &data,vector touched); Now special actions should be taken to create sessions hash.But you need to call destroy() explicitly to destroy sessions hash.
    Hope you'll enjoy it.
    Regards Alexander I. Olefirenko

    nechaeff 2000