![]()  | 
  
    Webdar 1.0.0
    
   Web user interface to libdar 
   | 
 
buffers data from a TCP connexion, this is a pure virtual class More...
#include <proto_connexion.hpp>

Public Types | |
| enum | status { connected , not_connected } | 
Public Member Functions | |
| proto_connexion (const std::string &peerip, unsigned int peerport) | |
| constructor  | |
| proto_connexion (const proto_connexion &ref)=delete | |
| forbidding copy constuctor and assignment operator  | |
| proto_connexion (proto_connexion &&ref) noexcept=delete | |
| proto_connexion & | operator= (const proto_connexion &ref)=delete | 
| proto_connexion & | operator= (proto_connexion &&ref) noexcept=delete | 
| virtual | ~proto_connexion () | 
| destructor  | |
| status | get_status () const | 
| const std::string & | get_ip () const | 
| unsigned int | get_port () const | 
| char | read_one (bool blocking) | 
| extracts one byte form the buffer / exception thrown if not available  | |
| char | read_test_first (bool blocking) | 
| char | read_test_second (bool blocking) | 
| void | write (const char *a, unsigned int size) | 
| write data  More... | |
| void | flush_write () | 
| flush pending writings if any  | |
Protected Member Functions | |
| virtual void | write_impl (const char *a, unsigned int size)=0 | 
| implementation of the low level (without buffering) writing operation  More... | |
| virtual unsigned int | read_impl (char *a, unsigned int size, bool blocking)=0 | 
| implementation of the low level (without buffering) reading operation  More... | |
| void | set_status (status st) | 
| let inherited class modifying the object status  | |
buffers data from a TCP connexion, this is a pure virtual class
this class provide buffering mechanism to read block of data and broke then in pieces of bytes or single byte upon request
      
  | 
  protectedpure virtual | 
implementation of the low level (without buffering) reading operation
Implemented in connexion, and ssl_connexion.
| char proto_connexion::read_test_first | ( | bool | blocking | ) | 
gives the next char to be read, but do not remove it from the reading buffer / throw exception if not available
| char proto_connexion::read_test_second | ( | bool | blocking | ) | 
gives the second next char to be read, but do not remove it from the reading buffer / throw exception if not available
| void proto_connexion::write | ( | const char * | a, | 
| unsigned int | size | ||
| ) | 
write data
param[in] a data to write param[in] size amount of byte to write
      
  | 
  protectedpure virtual | 
implementation of the low level (without buffering) writing operation
Implemented in connexion, and ssl_connexion.