Loading...
Searching...
No Matches
bitfocus::module_handler_base Struct Referenceabstract
Inheritance diagram for bitfocus::module_handler_base:
bitfocus::module_handler

Public Member Functions

 module_handler_base (QString node_path, QString module_path, QString entrypoint, QString connection_id)
 
void on_read (QSocketDescriptor, QSocketNotifier::Type)
 
void do_write (std::string_view res)
 
bool restart_process ()
 Starts the module again, false where unsupported.
 
virtual void processMessage (std::string_view)=0
 
virtual void on_process_exited ()
 

Public Attributes

std::size_t max_message_size = 256 * 1024 * 1024
 
char buf [16 *4096] {}
 
std::vector< char > queue
 
std::size_t scanned {}
 Bytes of the queue already searched for a message end.
 
std::string pending_write
 Bytes the module has not read yet: the socket is non-blocking.
 
std::unique_ptr< QProcess > process
 
QSocketNotifier * socket {}
 
QSocketNotifier * write_socket {}
 
int pfd [2] {-1, -1}
 
bool discarding {}
 Skipping the rest of an over-long message.
 
int release_grace_ms {}
 How long the process gets to shut down once released.
 

Member Data Documentation

◆ max_message_size

std::size_t bitfocus::module_handler_base::max_message_size = 256 * 1024 * 1024

Longest message accepted from the module, and most bytes waiting for it to read; past that, messages are dropped


The documentation for this struct was generated from the following files: