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

provides read/write implementation of a socket object More...

#include <ssl_connexion.hpp>

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

Public Member Functions

 ssl_connexion (int fd, SSL_CTX &ctx, const std::string &peerip, unsigned int peerport)
 constructor: create a new object based on a existing socket filedescriptor
 
 ssl_connexion (const ssl_connexion &ref)=delete
 copy is forbidden, move is allowed
 
 ssl_connexion (ssl_connexion &&ref) noexcept=delete
 
ssl_connexionoperator= (const ssl_connexion &ref)=delete
 
ssl_connexionoperator= (ssl_connexion &&ref) noexcept=delete
 
 ~ssl_connexion ()
 destructor
 
- Public Member Functions inherited from connexion
 connexion (int fd, const std::string &peerip, unsigned int peerport)
 constructor: create a new object based on a existing socket filedescriptor
 
 connexion (const connexion &ref)=delete
 forbidding copy constuctor and assignment operator
 
 connexion (connexion &&ref) noexcept=delete
 
connexionoperator= (const connexion &ref)=delete
 
connexionoperator= (connexion &&ref) noexcept=delete
 
 ~connexion ()
 destructor
 
- Public Member Functions inherited from proto_connexion
 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_connexionoperator= (const proto_connexion &ref)=delete
 
proto_connexionoperator= (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) override
 inherited from proto_connexion More...
 
virtual unsigned int read_impl (char *a, unsigned int size, bool blocking) override
 inherited from proto_connexion More...
 
virtual void write_impl (const char *a, unsigned int size) override
 inherited from proto_connexion More...
 
virtual unsigned int read_impl (char *a, unsigned int size, bool blocking) override
 inherited from proto_connexion More...
 
- Protected Member Functions inherited from proto_connexion
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
 

Additional Inherited Members

- Public Types inherited from proto_connexion
enum  status { connected , not_connected }
 

Detailed Description

provides read/write implementation of a socket object

Note
used for http connections (non ssl/tls connections)

Member Function Documentation

◆ read_impl()

unsigned int ssl_connexion::read_impl ( char *  a,
unsigned int  size,
bool  blocking 
)
overrideprotectedvirtual

inherited from proto_connexion

Reimplemented from connexion.

◆ write_impl()

void ssl_connexion::write_impl ( const char *  a,
unsigned int  size 
)
overrideprotectedvirtual

inherited from proto_connexion

Reimplemented from connexion.


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