E-MailRelay
|
An interface used by GNet::SocketProtocol to deliver data from a socket. More...
#include <gsocketprotocol.h>
Public Member Functions | |
virtual | ~SocketProtocolSink ()=default |
Destructor. | |
virtual void | onData (const char *, std::size_t)=0 |
Called when data is read from the socket. More... | |
virtual void | onSecure (const std::string &peer_certificate, const std::string &protocol, const std::string &cipher)=0 |
Called once the secure socket protocol has been successfully negotiated. | |
virtual void | onPeerDisconnect ()=0 |
Called, if enabled by the readEvent()/otherEvent() parameter, when the peer disconnects with a socket shutdown. More... | |
An interface used by GNet::SocketProtocol to deliver data from a socket.
Definition at line 176 of file gsocketprotocol.h.
|
pure virtual |
Called when data is read from the socket.
Implemented in GNet::ServerPeer.
|
pure virtual |
Called, if enabled by the readEvent()/otherEvent() parameter, when the peer disconnects with a socket shutdown.
This tells us that the peer will not send any more data but we can keep sending. The SocketProtocol class will have already dropped the socket read handler. If we have previously done our own shutdown then both directions are now closed and the connection is defunct.