|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Callback interface for asynchronous delivery of parsed network traffic. More...
#include <NetworkManager.h>
Public Member Functions | |
| NetworkReceiver () | |
| virtual bool | receiveNetworkEvent (NetworkEvent *evt, NetworkChannel *channel, uint64 conid) |
| A connection lifecycle event occurred. | |
| virtual bool | receiveHTTPRequest (HTTPRequest *req, NetworkChannel *channel, uint64 conid) |
| An HTTP request arrived on a server connection. | |
| virtual bool | receiveMessage (DataMessage *msg, NetworkChannel *channel, uint64 conid) |
| A binary DataMessage arrived. | |
| virtual bool | receiveTelnetLine (TelnetLine *line, NetworkChannel *channel, uint64 conid) |
| A Telnet line arrived. | |
| virtual bool | receiveHTTPReply (HTTPReply *reply, HTTPRequest *req, NetworkChannel *channel, uint64 conid) |
| An HTTP reply to an earlier async request arrived. | |
| virtual bool | receiveWebsocketData (WebsocketData *wsData, NetworkChannel *channel, uint64 conid) |
| A WebSocket message arrived. | |
Callback interface for asynchronous delivery of parsed network traffic.
Implement the receive*() methods you care about and pass the object to NetworkManager::createListener() / create*Connection(); each incoming item is then pushed to you instead of being queued for waitFor*(). Default implementations return false, meaning "not handled" — unhandled items are queued on the channel instead.
Definition at line 93 of file NetworkManager.h.
|
inline |
Definition at line 95 of file NetworkManager.h.
|
inlinevirtual |
An HTTP reply to an earlier async request arrived.
| reply | The reply. |
| req | The originating request. |
| channel | Channel. |
| conid | Connection id. |
Reimplemented in cmlabs::RequestClient.
Definition at line 105 of file NetworkManager.h.
|
inlinevirtual |
An HTTP request arrived on a server connection.
| req | The request. |
| channel | Originating channel. |
| conid | Connection id (use for sendHTTPReply()). |
Reimplemented in cmlabs::HTTPTestServer, cmlabs::RequestExecutor, cmlabs::RequestGateway, and cmlabs::WebsocketTestServer.
Definition at line 99 of file NetworkManager.h.
|
inlinevirtual |
A binary DataMessage arrived.
| msg | The message. |
| channel | Originating channel. |
| conid | Connection id. |
Reimplemented in cmlabs::RequestClient, cmlabs::RequestExecutor, and cmlabs::RequestGateway.
Definition at line 101 of file NetworkManager.h.
|
inlinevirtual |
A connection lifecycle event occurred.
| evt | Event data. |
| channel | Originating channel. |
| conid | Connection id. |
Reimplemented in cmlabs::RequestClient, cmlabs::RequestExecutor, and cmlabs::RequestGateway.
Definition at line 97 of file NetworkManager.h.
|
inlinevirtual |
A Telnet line arrived.
| line | The line. |
| channel | Originating channel. |
| conid | Connection id. |
Definition at line 103 of file NetworkManager.h.
|
inlinevirtual |
A WebSocket message arrived.
| wsData | The frame/message. |
| channel | Channel. |
| conid | Connection id. |
Reimplemented in cmlabs::RequestGateway, and cmlabs::WebsocketTestServer.
Definition at line 107 of file NetworkManager.h.