tnt Namespace Reference

in tntnet (mainthread): Jobqueue queue; void mainloop() { while (1) { Jobqueue::JobPtr j = new Tcpjob(); j->accept(poller.get()); queue.put(j); } } More...

Namespaces

namespace  httpheader
namespace  qhelper

Classes

class  ApplicationUnlocker
 Unlocks the application (and session) as long as the object is in scope. More...
class  BackgroundTask
class  BackgroundWorker
class  Cmd
struct  Compident
 This is a class, which names tntnet components. More...
class  LibraryNotFound
class  Dlcloser
class  ComponentLibrary
class  Comploader
class  Component
class  ComponentFactory
class  ComponentFactoryImpl
class  Configurator
 Helper class for easier configuration of tntnet when used as library. More...
class  Contentdisposition
 Content-Disposition-Header. More...
class  Contenttype
 Content-type-field like rfc2045. More...
class  ConversionError
class  Cookie
class  Cookies
class  DataChunk
class  DataChunks
class  DeflateError
class  DeflateStreamBuf
class  DeflateStream
class  Mapping
class  Dispatcher
struct  Subcompident
class  EcppComponent
class  EcppSubComponent
class  Encoding
class  GnuTlsException
class  GnuTlsInit
class  GnuTlsX509Cred
class  GnuTlsServer
class  GnuTlsStream
class  GnuTls_streambuf
class  GnuTls_iostream
class  HtmlEscStreamBuf
class  HtmlEscOstream
class  HttpReturn
class  HttpError
 HTTP-error-class. More...
class  NotFoundException
 HTTP-error 404. More...
class  NotAuthorized
class  MovedTemporarily
class  HttpMessage
 Baseclass for HTTP-messages. More...
class  RequestSizeMonitor
class  HttpReply
 HTTP-Reply-message. More...
class  HttpRequest
 HTTP-Request-message. More...
class  Job
 Job - one per request. More...
class  Jobqueue
 Jobqueue - one per process. More...
class  LangLib
class  ListenerBase
class  Listener
class  Maptarget
class  MbComponent
class  MessageattributeParser
 Messageattribute like form-data; name="my-upload-field"; filename="ttt.sh" or application/x-shellscript see also rfc2045. More...
class  Messageheader
 Standard-message-header like rfc822. More...
class  MimeDb
class  Partheader
 header of a MIME-multipart-object More...
class  Part
 Part of a MIME-multipart-object. More...
class  Multipart
 a MIME-Multipart-Object More...
class  Object
class  PointerObject
class  OpensslException
class  SslCtxReleaser< SSL_CTX >
class  OpensslServer
class  OpensslStream
class  openssl_streambuf
class  openssl_iostream
class  PrePostNop
class  Parser
class  PollerIf
class  Poller
class  PollerImpl
class  QueryParams
class  Savepoint
class  NullDestroyPolicy
class  Scope
class  ScopeManager
class  Sessionscope
class  SessionUnlocker
 Unlocks the session as long as the object is in scope. More...
class  SocketIf
class  StressHttpClientStreambuf
class  StressHttpClient
class  StressJob
class  StringLessIgnoreCase
class  Tcpjob
class  ThreadContext
struct  TntConfig
class  Tntnet
 Main application class for stand alone webapplication. More...
class  unzipError
class  unzipFileNotFound
class  unzipEndOfListOfFile
class  unzipParamError
class  unzipBadZipFile
class  unzipInternalError
class  unzipCrcError
class  unzipFile
class  unzipFileStreamBuf
class  unzipFileStream
class  UrlEscStreamBuf
class  UrlEscOstream
class  Urlmapper
class  Worker
class  Zdata

Typedefs

typedef cxxtools::SmartPtr
< SSL_CTX,
cxxtools::ExternalRefCounted,
SslCtxReleaser
SslCtxPtr

Functions

std::ostream & operator<< (std::ostream &out, const Compident &comp)
std::istream & operator>> (std::istream &in, Contentdisposition &ct)
std::istream & operator>> (std::istream &in, Contenttype &ct)
template<typename T >
std::string toString (const T &value)
template<typename T >
std::string toString (const T &value, const std::locale &loc)
template<>
std::string toString (const std::string &value)
template<>
std::string toString (const std::string &value, const std::locale &)
std::string toString (const char *value)
std::string toString (const char *value, const std::locale &)
std::string toString (char value)
std::string toString (char value, const std::locale &)
std::string toString (bool value)
std::string toString (bool value, const std::locale &)
template<typename T >
stringTo (const char *argname, const char *typeto, const std::string &value)
template<typename T >
stringTo (const char *argname, const char *typeto, const std::string &value, const std::locale &loc)
template<typename T >
stringToWithDefault (const std::string &value, const T &def)
template<typename T >
stringToWithDefault (const std::string &value, const T &def, const std::locale &loc)
template<>
std::string stringTo< std::string > (const char *, const char *, const std::string &value)
template<>
std::string stringTo< std::string > (const char *, const char *, const std::string &value, const std::locale &)
template<>
char stringTo< char > (const char *argname, const char *typeto, const std::string &value)
template<>
char stringTo< char > (const char *argname, const char *typeto, const std::string &value, const std::locale &)
template<>
bool stringTo< bool > (const char *, const char *, const std::string &value)
template<>
bool stringTo< bool > (const char *, const char *, const std::string &value, const std::locale &)
template<>
std::string stringToWithDefault< std::string > (const std::string &value, const std::string &)
template<>
std::string stringToWithDefault< std::string > (const std::string &value, const std::string &, const std::locale &)
template<>
char stringToWithDefault< char > (const std::string &value, const char &def)
template<>
char stringToWithDefault< char > (const std::string &value, const char &def, const std::locale &)
template<>
bool stringToWithDefault< bool > (const std::string &value, const bool &def)
template<>
bool stringToWithDefault< bool > (const std::string &value, const bool &def, const std::locale &)
template<typename iteratorType , typename vectorType >
void convertRange (const char *argname, const char *typeto, iteratorType b, iteratorType e, vectorType &v, const std::locale &l)
std::ostream & operator<< (std::ostream &out, const Cookies &c)
std::ostream & operator<< (std::ostream &out, const DataChunk &c)
std::string getPageScopePrefix (const Compident &id)
template<typename compident_type >
std::string getComponentScopePrefix (const compident_type &id)
unsigned controllerCaller (void *, tnt::HttpRequest &, tnt::HttpReply &, tnt::QueryParams &)
unsigned controllerCaller (tnt::Component *component, tnt::HttpRequest &request, tnt::HttpReply &reply, tnt::QueryParams &qparams)
std::istream & operator>> (std::istream &in, HttpRequest &msg)
std::istream & operator>> (std::istream &in, Messageheader &data)
template<typename data_type >
Object::pointer_type createPointerObject (const data_type &d)
template<typename stringType >
int StringCompareIgnoreCase (const stringType &s1, const stringType &s2)
template<>
int StringCompareIgnoreCase< const char * > (const char *const &s1, const char *const &s2)
int StringCompareIgnoreCase (const std::string &s1, const std::string &s2)
void operator>>= (const cxxtools::SerializationInfo &si, TntConfig::Mapping &mapping)
void operator>>= (const cxxtools::SerializationInfo &si, TntConfig::Listener &listener)
void operator>>= (const cxxtools::SerializationInfo &si, TntConfig::SslListener &ssllistener)
void operator>>= (const cxxtools::SerializationInfo &si, TntConfig &config)
std::string urlEscape (const std::string &str)
void throwRuntimeError (const std::string &msg)
void throwRuntimeError (const char *msg)

Variables

const std::string factorySuffix

Detailed Description

in tntnet (mainthread): Jobqueue queue; void mainloop() { while (1) { Jobqueue::JobPtr j = new Tcpjob(); j->accept(poller.get()); queue.put(j); } }

This defines a job, which makes a local request to stresstest tntnet without network.

in server (workerthread): void Server::run() { while (1) { Jobqueue::JobPtr j = queue.get(); std::iostream& socket = j->getStream(); processRequest(socket); } }

The job regenerates itself automatically so that tntnet runs as fast as possible.

To use it, tntnet has to put a single stressjob into the queue on initialization.

Typedef Documentation

Function Documentation

unsigned tnt::controllerCaller ( void *  ,
tnt::HttpRequest ,
tnt::HttpReply ,
tnt::QueryParams  
)
inline
unsigned tnt::controllerCaller ( tnt::Component component,
tnt::HttpRequest request,
tnt::HttpReply reply,
tnt::QueryParams qparams 
)
inline
template<typename iteratorType , typename vectorType >
void tnt::convertRange ( const char *  argname,
const char *  typeto,
iteratorType  b,
iteratorType  e,
vectorType &  v,
const std::locale &  l 
)
template<typename data_type >
Object::pointer_type tnt::createPointerObject ( const data_type &  d)
template<typename compident_type >
std::string tnt::getComponentScopePrefix ( const compident_type &  id)
std::string tnt::getPageScopePrefix ( const Compident &  id)
inline
std::ostream& tnt::operator<< ( std::ostream &  out,
const Compident &  comp 
)
inline
std::ostream& tnt::operator<< ( std::ostream &  out,
const DataChunk &  c 
)
inline
std::ostream& tnt::operator<< ( std::ostream &  out,
const Cookies &  c 
)
std::istream& tnt::operator>> ( std::istream &  in,
Contentdisposition &  ct 
)
inline
std::istream& tnt::operator>> ( std::istream &  in,
Contenttype &  ct 
)
inline
std::istream& tnt::operator>> ( std::istream &  in,
Messageheader &  data 
)
std::istream& tnt::operator>> ( std::istream &  in,
HttpRequest &  msg 
)
inline
void tnt::operator>>= ( const cxxtools::SerializationInfo si,
TntConfig::Mapping &  mapping 
)
void tnt::operator>>= ( const cxxtools::SerializationInfo si,
TntConfig::Listener &  listener 
)
void tnt::operator>>= ( const cxxtools::SerializationInfo si,
TntConfig::SslListener &  ssllistener 
)
void tnt::operator>>= ( const cxxtools::SerializationInfo si,
TntConfig &  config 
)
template<typename stringType >
int tnt::StringCompareIgnoreCase ( const stringType &  s1,
const stringType &  s2 
)
int tnt::StringCompareIgnoreCase ( const std::string &  s1,
const std::string &  s2 
)
inline
template<>
int tnt::StringCompareIgnoreCase< const char * > ( const char *const &  s1,
const char *const &  s2 
)
template<typename T >
T tnt::stringTo ( const char *  argname,
const char *  typeto,
const std::string &  value 
)
inline
template<typename T >
T tnt::stringTo ( const char *  argname,
const char *  typeto,
const std::string &  value,
const std::locale &  loc 
)
inline
template<>
bool tnt::stringTo< bool > ( const char *  ,
const char *  ,
const std::string &  value 
)
inline
template<>
bool tnt::stringTo< bool > ( const char *  ,
const char *  ,
const std::string &  value,
const std::locale &   
)
inline
template<>
char tnt::stringTo< char > ( const char *  argname,
const char *  typeto,
const std::string &  value 
)
inline
template<>
char tnt::stringTo< char > ( const char *  argname,
const char *  typeto,
const std::string &  value,
const std::locale &   
)
inline
template<>
std::string tnt::stringTo< std::string > ( const char *  ,
const char *  ,
const std::string &  value 
)
inline
template<>
std::string tnt::stringTo< std::string > ( const char *  ,
const char *  ,
const std::string &  value,
const std::locale &   
)
inline
template<typename T >
T tnt::stringToWithDefault ( const std::string &  value,
const T &  def 
)
inline
template<typename T >
T tnt::stringToWithDefault ( const std::string &  value,
const T &  def,
const std::locale &  loc 
)
inline
template<>
bool tnt::stringToWithDefault< bool > ( const std::string &  value,
const bool &  def 
)
inline
template<>
bool tnt::stringToWithDefault< bool > ( const std::string &  value,
const bool &  def,
const std::locale &   
)
inline
template<>
char tnt::stringToWithDefault< char > ( const std::string &  value,
const char &  def 
)
inline
template<>
char tnt::stringToWithDefault< char > ( const std::string &  value,
const char &  def,
const std::locale &   
)
inline
template<>
std::string tnt::stringToWithDefault< std::string > ( const std::string &  value,
const std::string &   
)
inline
template<>
std::string tnt::stringToWithDefault< std::string > ( const std::string &  value,
const std::string &  ,
const std::locale &   
)
inline
void tnt::throwRuntimeError ( const std::string &  msg)
void tnt::throwRuntimeError ( const char *  msg)
template<typename T >
std::string tnt::toString ( const T &  value)
inline
template<typename T >
std::string tnt::toString ( const T &  value,
const std::locale &  loc 
)
inline
template<>
std::string tnt::toString ( const std::string &  value)
inline
template<>
std::string tnt::toString ( const std::string &  value,
const std::locale &   
)
inline
std::string tnt::toString ( const char *  value)
inline
std::string tnt::toString ( const char *  value,
const std::locale &   
)
inline
std::string tnt::toString ( char  value)
inline
std::string tnt::toString ( char  value,
const std::locale &   
)
inline
std::string tnt::toString ( bool  value)
inline
std::string tnt::toString ( bool  value,
const std::locale &   
)
inline
std::string tnt::urlEscape ( const std::string &  str)

Variable Documentation

const std::string tnt::factorySuffix