rili::service::SocketBase::Connection Class Referenceabstract
Inheritance diagram for rili::service::SocketBase::Connection:
[legend]
Collaboration diagram for rili::service::SocketBase::Connection:
[legend]

Classes

class  ModeGuard
 
class  ReadableWouldBlock
 
class  WritableWouldBlock
 

Public Types

enum  Mode : bool { Blocking, NonBlocking }
 

Public Member Functions

virtual void mode (Mode mode)=0
 
virtual Mode mode () const =0
 
virtual bool readWouldBlock () const =0
 
virtual bool writeWouldBlock () const =0
 
- Public Member Functions inherited from rili::stream::Duplex
 Duplex (Duplex const &other)=delete
 
Duplexoperator= (Duplex const &other)=delete
 
- Public Member Functions inherited from rili::stream::Readable
void read (unsigned char *data, std::size_t size)
 
void read (char *data, std::size_t size)
 
void read (unsigned char &c)
 
void read (char &c)
 
virtual void consume (std::size_t size)=0
 
virtual view::Base const & readableView () const =0
 
virtual std::exception_ptr pull (std::size_t count)=0
 
OperationResult operator>> (char &v)
 
OperationResult operator>> (unsigned char &v)
 
OperationResult operator>> (short &v)
 
OperationResult operator>> (unsigned short &v)
 
OperationResult operator>> (long &v)
 
OperationResult operator>> (unsigned long &v)
 
OperationResult operator>> (long long &v)
 
OperationResult operator>> (unsigned long long &v)
 
OperationResult operator>> (int &v)
 
OperationResult operator>> (unsigned int &v)
 
OperationResult operator>> (float &v)
 
OperationResult operator>> (double &v)
 
OperationResult operator>> (bool &v)
 
OperationResult operator>> (void *&v)
 
OperationResult operator>> (std::string &v)
 
OperationResult operator>> (Reader const &fn)
 
- Public Member Functions inherited from rili::stream::Writable
virtual void write (char const *data, std::size_t size)=0
 
virtual std::exception_ptr flush ()=0
 
virtual view::Base const & writableView () const =0
 
void write (unsigned char const *data, std::size_t size)
 
Writableoperator<< (char v)
 
Writableoperator<< (unsigned char v)
 
Writableoperator<< (char const *v)
 
Writableoperator<< (unsigned char const *v)
 
Writableoperator<< (std::string const &v)
 
Writableoperator<< (short v)
 
Writableoperator<< (unsigned short v)
 
Writableoperator<< (long v)
 
Writableoperator<< (unsigned long v)
 
Writableoperator<< (long long v)
 
Writableoperator<< (unsigned long long v)
 
Writableoperator<< (int v)
 
Writableoperator<< (unsigned int v)
 
Writableoperator<< (float v)
 
Writableoperator<< (double v)
 
Writableoperator<< (bool v)
 
Writableoperator<< (void *v)
 
OperationResult operator<< (std::function< OperationResult(Writable &)> const &fn)
 
Writableoperator<< (Writer const &fn)
 

Additional Inherited Members

- Protected Member Functions inherited from rili::stream::Duplex
 Duplex (Duplex &&other)=default
 
Duplexoperator= (Duplex &&other)=default
 

Member Enumeration Documentation

The Mode enum is used to distinguish blocking and non-blocking modes of Connection.

Member Function Documentation

virtual void rili::service::SocketBase::Connection::mode ( Mode  mode)
pure virtual

mode reconfigure connection to use given Mode

Parameters
mode- Mode to set
virtual Mode rili::service::SocketBase::Connection::mode ( ) const
pure virtual

mode aquire Connection current mode.

Returns
virtual bool rili::service::SocketBase::Connection::readWouldBlock ( ) const
pure virtual

readWouldBlock in blocking mode always return true. In non-blocking mode return true if last read operation would block, otherwise false

Returns
virtual bool rili::service::SocketBase::Connection::writeWouldBlock ( ) const
pure virtual

writeWouldBlock in blocking mode always return true. In non-blocking mode return true if last write operation would block, otherwise false

Returns

The documentation for this class was generated from the following file:
  • rili/service/Socket.hpp