MCPcopy Create free account
hub / github.com/DeNA/HandlerSocket-Plugin-for-MySQL / read_more

Method read_more

libhsclient/hstcpcli.cpp:123–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123int
124hstcpcli::read_more()
125{
126 const size_t block_size = 4096; // FIXME
127 char *const wp = readbuf.make_space(block_size);
128 const ssize_t rlen = read(fd.get(), wp, block_size);
129 if (rlen <= 0) {
130 if (rlen < 0) {
131 error_str = "read: failed";
132 } else {
133 error_str = "read: eof";
134 }
135 return rlen;
136 }
137 readbuf.space_wrote(rlen);
138 return rlen;
139}
140
141void
142hstcpcli::clear_error()

Callers

nothing calls this directly

Calls 3

make_spaceMethod · 0.80
space_wroteMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected