MCPcopy Create free account
hub / github.com/apache/qpid-proton / do_read

Method do_read

cpp/src/connection_driver_test.cpp:69–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 connection_driver(name), reads(rd), writes(wr), spinning(0) {}
68
69 void do_read() {
70 mutable_buffer rbuf = read_buffer();
71 size_t size = std::min(reads.size(), rbuf.size);
72 if (size) {
73 copy(reads.begin(), reads.begin()+size, static_cast<char*>(rbuf.data));
74 read_done(size);
75 reads.erase(reads.begin(), reads.begin()+size);
76 }
77 }
78
79 void do_write() {
80 const_buffer wbuf = write_buffer();

Callers

nothing calls this directly

Calls 3

eraseMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected