MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / emit

Method emit

server/src/common/daemon_loop.cpp:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33// ── DaemonIO ────────────────────────────────────────────────────────────
34
35void DaemonIO::emit(int32_t v) const {
36 // Call the token callback for non-sentinel tokens.
37 if (on_token && v >= 0) {
38 if (!on_token(v)) {
39 cancelled = true;
40 return;
41 }
42 }
43
44 if (stream_fd < 0) return;
45#ifndef _WIN32
46 ssize_t n = ::write(stream_fd, &v, sizeof(v));
47 (void)n;
48#else
49 _write(stream_fd, &v, sizeof(v));
50#endif
51}
52
53DaemonIO DaemonIO::with_token_callback(const TokenCallback & cb) const {
54 DaemonIO out = *this;

Callers 15

decode_arMethod · 0.80
decode_dflashMethod · 0.80
do_decodeMethod · 0.80
generate_implMethod · 0.80
handle_compressMethod · 0.80
generate_implMethod · 0.80
do_hybrid_spec_decodeMethod · 0.80
run_dflash_spec_decodeFunction · 0.80
run_daemonFunction · 0.80

Calls 1

writeFunction · 0.85

Tested by 3

decode_arMethod · 0.64
decode_dflashMethod · 0.64
run_dflash_spec_decodeFunction · 0.64