SNode.C
|
#include <EchoSocketContext.h>
Public Types | |
enum class | Role { SERVER , CLIENT } |
Public Member Functions | |
EchoSocketContext (core::socket::stream::SocketConnection *socketConnection, Role role) | |
![]() | |
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) |
void | close () override |
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 |
void | onDisconnected () override |
bool | onSignal (int signum) override |
std::size_t | onReceivedFromPeer () override |
Private Attributes | |
Role | role |
Additional Inherited Members | |
![]() | |
void | onWriteError (int errnum) override |
void | onReadError (int errnum) override |
![]() | |
SocketContext ()=default | |
virtual | ~SocketContext () |
Definition at line 38 of file EchoSocketContext.h.
|
strong |
Enumerator | |
---|---|
SERVER | |
CLIENT |
Definition at line 40 of file EchoSocketContext.h.
|
explicit |
Definition at line 32 of file EchoSocketContext.cpp.
|
overrideprivatevirtual |
Implements core::socket::stream::SocketContext.
Definition at line 37 of file EchoSocketContext.cpp.
|
overrideprivatevirtual |
Implements core::socket::stream::SocketContext.
Definition at line 45 of file EchoSocketContext.cpp.
|
overrideprivatevirtual |
Implements core::socket::SocketContext.
Definition at line 53 of file EchoSocketContext.cpp.
|
overrideprivatevirtual |
Implements core::socket::SocketContext.
Definition at line 49 of file EchoSocketContext.cpp.
|
private |
Definition at line 52 of file EchoSocketContext.h.