Oncaphillis::Ligh++pd

lighttpd::Connection Class Reference

#include <src/ligh++pd/connection.h>


Detailed Description

The Connection class instance covers the connection pointer from the lighttpd C-World.

It acts like a opaque connection pointer and offers additional functionality.

  • An Output Stream

    This is a niftyLib::IO::device_stream based std::ostream which allows the plugin to output data to the client. A reference to this std::ostream is accessible via a call to Connection::out.

    Example

          my_Plugin::result_t my_Plugin::handle_uri_clean(Server &s,Connection &c) {
           ...
           ...
    
           c.out() << "<html><head></head><body>" << std::endl
                   << "<h1>Hello World</h1>"      << std::endl
                   << "</body></html>"            << std::endl;
           ...
           ...
          }
    

  • An Input Stream

    This std::istream & is based upon a specialized niftyLib::IO::device_streambuf which gives access to the input data of the current request. A reference to this stream is available via a call to Connection::in.

    Example

          my_Plugin::result_t my_Plugin::handle_uri_clean(Server &s,Connection &c) {
           ...
           ...
    
           c.in()  >> s;
           c.log() << "You gave me:: '" << s << "'" << std::endl;
           ...
           ...
          }
    

See also:
Server,Request,connection,

Public Member Functions

 Connection (::connection *c)
 CTor taking a connection * as an argument.
 ~Connection ()
 Connection::DTor.
 operator::connection * ()
 operator const ::connection * () const
::connectionoperator-> ()
::connectionoperator* ()
const ::connectionoperator-> () const
const ::connectionoperator* () const
const Requestrequest () const
std::string uri () const
std::string path () const
std::istream & in ()
std::ostream & out ()

Constructor & Destructor Documentation

lighttpd::Connection::Connection ( ::connection c  )  [inline]

CTor taking a connection * as an argument.

lighttpd::Connection::~Connection (  )  [inline]

Connection::DTor.


Member Function Documentation

lighttpd::Connection::operator::connection * (  )  [inline]

lighttpd::Connection::operator const ::connection * (  )  const [inline]

::connection* lighttpd::Connection::operator-> (  )  [inline]

::connection& lighttpd::Connection::operator* (  )  [inline]

const ::connection* lighttpd::Connection::operator-> (  )  const [inline]

const ::connection& lighttpd::Connection::operator* (  )  const [inline]

const Request& lighttpd::Connection::request (  )  const [inline]

std::string lighttpd::Connection::uri (  )  const [inline]

std::string lighttpd::Connection::path (  )  const [inline]

std::istream& lighttpd::Connection::in (  )  [inline]

std::ostream& lighttpd::Connection::out (  )  [inline]


The documentation for this class was generated from the following file:

Generated by  doxygen
© 2008; Dr. Sebastian Kloska ( Oncaphillis )
Powered by: [?]