Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

sessionserver.h File Reference

Defines SessionServer that allows cgi programs to communicate with the browser using stream-like operations. More...

#include <iostream>
#include <dvutil/props.h>
#include <dvnet/usocket.h>
#include <dvnet/userversocket.h>
#include <dvcgi/httphead.h>

Include dependency graph for sessionserver.h:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace  Dv
namespace  Dv::Cgi

Classes

class  Dv::Cgi::SessionServer
 A class that packages the link to the hidden server. More...
class  Dv::Cgi::SessionServer::Filter
 Filter class that ensures that header_ is output before anything else. More...

Functions

void eof (SessionServer &)
 Convenience function, simply calls refresh on its argument.
void operator<< (std::ostream &os, void(*f)(Dv::Cgi::SessionServer &))
 Overloading for SessionServer manipulation.


Detailed Description

Defines SessionServer that allows cgi programs to communicate with the browser using stream-like operations.

Definition in file sessionserver.h.


Function Documentation

void eof SessionServer &   ) 
 

Convenience function, simply calls refresh on its argument.

Example:

  Dv::Cgi::SessionServer s(..);

  s.header().content_type("text/html").no_cache();

  while (s) {
    Dv::Util::Props& input(s.props());

    s << "<html>..</html>" << Dv::Cgi::eof;
    }
See also:
operator<<(std::ostream& os, void (*f)(Dv::Cgi::SessionServer&)

void operator<< std::ostream &  os,
void(*  f)(Dv::Cgi::SessionServer &)
 

Overloading for SessionServer manipulation.

Warning:
Uses dynamic_cast<SessionServer*>(os) internally.
See also:
Dv::Cgi::eof


dvcgi-0.5.12 [27 April, 2004]