E-MailRelay
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
GNet::SocketProtocolImp Class Reference

A pimple-pattern implementation class used by GNet::SocketProtocol. More...

Classes

struct  Position
 A pointer into the scatter/gather payload of GNet::SocketProtocolImp::send(). More...
 

Public Types

using Result = GSsl::Protocol::Result
 
using Segment = G::string_view
 
using Segments = std::vector< Segment >
 

Public Member Functions

 SocketProtocolImp (EventHandler &, ExceptionSink, SocketProtocol::Sink &, StreamSocket &, unsigned int secure_connection_timeout)
 
void readEvent ()
 
bool writeEvent ()
 
void otherEvent (EventHandler::Reason)
 
bool send (const std::string &data, std::size_t offset)
 
bool send (const Segments &, std::size_t)
 
void shutdown ()
 
void secureConnect ()
 
void secureAccept ()
 
bool secure () const
 
std::string peerCertificate () const
 
 SocketProtocolImp (const SocketProtocolImp &)=delete
 
 SocketProtocolImp (SocketProtocolImp &&)=delete
 
void operator= (const SocketProtocolImp &)=delete
 
void operator= (SocketProtocolImp &&)=delete
 

Static Public Member Functions

static void setReadBufferSize (std::size_t)
 

Friends

std::ostream & operator<< (std::ostream &, State)
 

Detailed Description

A pimple-pattern implementation class used by GNet::SocketProtocol.

Definition at line 40 of file gsocketprotocol.cpp.

Member Typedef Documentation

◆ Result

using GNet::SocketProtocolImp::Result = GSsl::Protocol::Result

Definition at line 43 of file gsocketprotocol.cpp.

◆ Segment

Definition at line 44 of file gsocketprotocol.cpp.

◆ Segments

using GNet::SocketProtocolImp::Segments = std::vector<Segment>

Definition at line 45 of file gsocketprotocol.cpp.

Constructor & Destructor Documentation

◆ SocketProtocolImp()

GNet::SocketProtocolImp::SocketProtocolImp ( EventHandler handler,
ExceptionSink  es,
SocketProtocol::Sink sink,
StreamSocket socket,
unsigned int  secure_connection_timeout 
)

Definition at line 147 of file gsocketprotocol.cpp.

Member Function Documentation

◆ otherEvent()

void GNet::SocketProtocolImp::otherEvent ( EventHandler::Reason  reason)

Definition at line 216 of file gsocketprotocol.cpp.

◆ peerCertificate()

std::string GNet::SocketProtocolImp::peerCertificate ( ) const

Definition at line 730 of file gsocketprotocol.cpp.

◆ readEvent()

void GNet::SocketProtocolImp::readEvent ( )

Definition at line 178 of file gsocketprotocol.cpp.

◆ secure()

bool GNet::SocketProtocolImp::secure ( ) const

Definition at line 356 of file gsocketprotocol.cpp.

◆ secureAccept()

void GNet::SocketProtocolImp::secureAccept ( )

Definition at line 409 of file gsocketprotocol.cpp.

◆ secureConnect()

void GNet::SocketProtocolImp::secureConnect ( )

Definition at line 361 of file gsocketprotocol.cpp.

◆ send() [1/2]

bool GNet::SocketProtocolImp::send ( const Segments &  segments,
std::size_t  offset 
)

Definition at line 293 of file gsocketprotocol.cpp.

◆ send() [2/2]

bool GNet::SocketProtocolImp::send ( const std::string &  data,
std::size_t  offset 
)

Definition at line 258 of file gsocketprotocol.cpp.

◆ setReadBufferSize()

void GNet::SocketProtocolImp::setReadBufferSize ( std::size_t  n)
static

Definition at line 167 of file gsocketprotocol.cpp.

◆ shutdown()

void GNet::SocketProtocolImp::shutdown ( )

Definition at line 322 of file gsocketprotocol.cpp.

◆ writeEvent()

bool GNet::SocketProtocolImp::writeEvent ( )

Definition at line 196 of file gsocketprotocol.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
SocketProtocolImp::State  state 
)
friend

Definition at line 125 of file gsocketprotocol.cpp.


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