CCF
|
Callback service for user-specific behaviour for TCP and UDP connections. More...
#include <socket.h>
Public Member Functions | |
SocketBehaviour (const char *name, const char *conn_name) | |
virtual | ~SocketBehaviour () |
virtual bool | on_read (size_t, uint8_t *&, sockaddr) |
virtual void | on_accept (ConnType &) |
To be implemented by servers with connections. | |
virtual void | on_start (int64_t) |
To be implemented by all servers (after registration) | |
virtual void | on_listening (const std::string &host, const std::string &service) |
Generic loggers for common reactions. | |
virtual void | on_connect () |
virtual void | on_disconnect () |
virtual void | on_bind_failed () |
Failure loggers for when things go wrong, but not fatal. | |
virtual void | on_connect_failed () |
virtual void | on_resolve_failed () |
Failure loggers for when things go wrong, fataly. | |
virtual void | on_listen_failed () |
Protected Attributes | |
const char * | name |
const char * | conn_name |
Callback service for user-specific behaviour for TCP and UDP connections.
ConnType | Either TCP (proxy_ptr<TCPImpl>) or UDP (proxy_ptr<UDPImpl>). |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
To be implemented by servers with connections.
|
inlinevirtual |
Failure loggers for when things go wrong, but not fatal.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Generic loggers for common reactions.
|
inlinevirtual |
To be implemented by clients Return false to immediately disconnect socket.
|
inlinevirtual |
Failure loggers for when things go wrong, fataly.
|
inlinevirtual |
To be implemented by all servers (after registration)
|
protected |
|
protected |