Webdar 1.0.0
Web user interface to libdar
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
server Class Reference

class server for TCP session management More...

#include <server.hpp>

Inheritance diagram for server:
Inheritance graph
[legend]
Collaboration diagram for server:
Collaboration graph
[legend]

Public Member Functions

 server (const std::shared_ptr< central_report > &creport, const std::shared_ptr< const authentication > &auth, std::unique_ptr< proto_connexion > &source)
 
 server (const server &ref)=delete
 
 server (server &&ref) noexcept=delete
 
serveroperator= (const server &ref)=delete
 
serveroperator= (server &&ref) noexcept=delete
 
void release_session ()
 used by another server to ask this object to release the session it uses
 
- Public Member Functions inherited from reference
 reference ()
 usual constructor
 
 reference (const reference &ref)
 copy constructor More...
 
 reference (reference &&ref) noexcept(false)
 move constructor (only operational for objects without peering) More...
 
referenceoperator= (const reference &ref)
 assignment operator (only operational for objects without peering) More...
 
referenceoperator= (reference &&ref) noexcept(false)
 move assigment operator More...
 
virtual ~reference ()
 destructor
 
void peer_with (reference *obj)
 method used to create a relation between two objects More...
 
void break_peer_with (reference *obj)
 break the peering with the object given as argument
 
bool is_peer (reference *obj) const
 whether a peering exists with that object
 
bool is_empty () const
 whether the current object has peering
 
unsigned int size () const
 the number of peers
 

Static Public Member Functions

static void force_disconnection_at_end_of_session (bool val)
 wether to emulate user logout while using basic authentication (see also class html_disconnect)
 

Protected Member Functions

virtual void inherited_run () override
 inherited from libthreadar::thread
 
- Protected Member Functions inherited from reference
virtual void broken_peering_from (reference *obj)
 to be informed when a peer has broke the peering with me More...
 
void reset_read_peers () const
 reset the peers reading
 
bool read_next_peer (reference *&peer) const
 

Detailed Description

class server for TCP session management

thread object that read request from the provided proto_connexion, send them to the appropriated session, managing authentication and sending back the answer to the browser at the other end of the proto_connexion.

Note
relies on a parser object to split byte flow into structured requests, challenge object for authentication validation of requests, and session class to find and interrogate the proper session. Server are spaws when an new TCP connection is received, while sessions objects stay alive accross TCP connections and are tear down on by user action on through the web interface.

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