|
SatCat5
|
Service for echoing ChatProto text messages.
For each received ChatProto message, send a reply containing prefix "You said..." followed by the received message contents. To avoid amplification with multiple ChatEcho services, it always replies to the sender, never to the broadcast address.
Definition at line 107 of file eth_chat.h.
#include <eth_chat.h>
Public Member Functions | |
| ChatEcho (satcat5::eth::ChatProto *service) | |
Bind to the designated ChatProto object. | |
Protected Member Functions | |
| void | frame_rcvd (satcat5::io::LimitedRead &src) override |
| Dispatch calls frame_rcvd(...) for each incoming frame with with a matching net::Type value. More... | |
Protected Attributes | |
| satcat5::eth::ChatProto *const | m_chat |
| satcat5::net::Type | m_filter |
| Incoming packet filter. | |
Private Attributes | |
| satcat5::net::Protocol * | m_next |
| Linked list of Protocols. | |
|
overrideprotectedvirtual |
Dispatch calls frame_rcvd(...) for each incoming frame with with a matching net::Type value.
The child class SHOULD read the frame contents from the provided "src" object, which is only valid until the function returns.
To send a reply:
The child class MUST override this method.
Implements satcat5::net::Protocol.
Definition at line 162 of file eth_chat.cc.