On server, channel dprint through the readline-device. Also some refactors and quality improvements.

This commit is contained in:
2026-01-09 14:28:58 -05:00
parent 1087d18a2e
commit 7fa3f39d72
15 changed files with 258 additions and 253 deletions

View File

@@ -4,6 +4,7 @@
#include <string>
#include <string_view>
#include <mutex>
#include "drvutil.hpp"
@@ -12,7 +13,7 @@ public:
using print_callback = void (*)(const std::u32string &text);
private:
print_callback print_cb_;
std::mutex mutex_;
std::u32string desired_command_;
std::u32string current_command_;
std::u32string desired_prompt_;
@@ -24,9 +25,6 @@ private:
public:
// The callback must be set before using the readline device.
void set_print_callback(print_callback cb);
// change the prompt.
void set_prompt(std::string_view prompt);