SNode.C
|
#include <SocketContext.h>
Public Member Functions | |
SocketContext (core::socket::stream::SocketConnection *socketConnection, Mqtt *mqtt) | |
![]() | |
SocketContext (core::socket::stream::SocketConnection *socketConnection) | |
void | sendToPeer (const char *chunk, std::size_t chunkLen) const final |
bool | streamToPeer (core::pipe::Source *source) const |
void | streamEof () |
std::size_t | readFromPeer (char *chunk, std::size_t chunklen) const final |
void | setTimeout (const utils::Timeval &timeout) final |
void | shutdownRead () |
void | shutdownWrite (bool forceClose=false) |
SocketConnection * | getSocketConnection () const |
virtual void | switchSocketContext (SocketContext *newSocketContext) |
void | sendToPeer (const std::string &data) const |
![]() | |
SocketContext (const SocketContext &)=delete | |
SocketContext (SocketContext &&)=delete | |
SocketContext & | operator= (const SocketContext &)=delete |
SocketContext & | operator= (SocketContext &&)=delete |
void | sendToPeer (const std::string &data) const |
Private Member Functions | |
void | onConnected () override |
std::size_t | onReceivedFromPeer () override |
void | onDisconnected () override |
bool | onSignal (int sig) override |
core::socket::stream::SocketConnection * | getSocketConnection () const override |
std::size_t | recv (char *chunk, std::size_t chunklen) override |
void | send (const char *chunk, std::size_t chunklen) override |
void | end (bool fatal) override |
void | close () override |
![]() | |
MqttContext (Mqtt *mqtt) | |
MqttContext (const MqttContext &)=default | |
MqttContext & | operator= (const MqttContext &)=default |
virtual | ~MqttContext () |
void | onConnected () |
std::size_t | onReceivedFromPeer () |
void | onDisconnected () |
bool | onSignal (int sig) |
Additional Inherited Members | |
![]() | |
void | onWriteError (int errnum) override |
void | onReadError (int errnum) override |
![]() | |
SocketContext ()=default | |
virtual | ~SocketContext () |
![]() | |
Mqtt * | mqtt |
Definition at line 42 of file SocketContext.h.
|
explicit |
Definition at line 28 of file SocketContext.cpp.
References iot::mqtt::MqttContext::MqttContext(), and core::socket::stream::SocketContext::SocketContext().
|
overrideprivatevirtual |
Reimplemented from core::socket::stream::SocketContext.
Definition at line 65 of file SocketContext.cpp.
References core::socket::stream::SocketContext::close().
|
overrideprivatevirtual |
Implements iot::mqtt::MqttContext.
Definition at line 61 of file SocketContext.cpp.
References core::socket::stream::SocketContext::shutdownWrite().
|
overrideprivatevirtual |
Implements iot::mqtt::MqttContext.
Definition at line 45 of file SocketContext.cpp.
References core::socket::stream::SocketContext::getSocketConnection().
|
overrideprivatevirtual |
Implements core::socket::stream::SocketContext.
Definition at line 33 of file SocketContext.cpp.
References iot::mqtt::MqttContext::onConnected().
|
overrideprivatevirtual |
Implements core::socket::stream::SocketContext.
Definition at line 37 of file SocketContext.cpp.
References iot::mqtt::MqttContext::onDisconnected().
|
overrideprivatevirtual |
Implements core::socket::SocketContext.
Definition at line 49 of file SocketContext.cpp.
References iot::mqtt::MqttContext::onReceivedFromPeer().
|
overrideprivatevirtual |
Implements core::socket::SocketContext.
Definition at line 41 of file SocketContext.cpp.
References iot::mqtt::MqttContext::onSignal().
|
overrideprivatevirtual |
Implements iot::mqtt::MqttContext.
Definition at line 53 of file SocketContext.cpp.
References core::socket::stream::SocketContext::readFromPeer().
|
overrideprivatevirtual |
Implements iot::mqtt::MqttContext.
Definition at line 57 of file SocketContext.cpp.
References core::socket::stream::SocketContext::sendToPeer().