9 #include <satcat5/eth_dispatch.h>
44 const std::string& msg);
Protocol handler for a simple text-messaging protocol This class implements a simple as-hoc text-mess...
Limited read of next N bytes.
Abstract API for writing byte-streams and packets.
A net::Protocol is the counterpart to net::Dispatch that handles a particular data stream,...
Callback object that prints incoming messages.
void write_next(u8 ch)
Writeable endpoint: Accumulate characters from input stream.
bool write_finalize() override
Writeable endpoint: Accumulate characters from input stream.
void print_message(const satcat5::eth::MacAddr &from, const std::string &msg)
Pretty formatting for incoming or outgoing messages.
ChatPrinter(satcat5::eth::ChatProto *chat, bool loopback=true)
Attach to the designated ChatProto service.
void frame_rcvd(satcat5::io::LimitedRead &rd) override
Handle incoming data from eth::ChatProto.
void send_message(const std::string &msg)
Send a message string to all other chat clients.
unsigned get_write_space() const override
Writeable endpoint: Accumulate characters from input stream.
I/O interface core definitions.
An Ethernet MAC address (with serializable interface).