MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / _read

Method _read

core/src/browser/riotclient.cc:127–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 }
126
127 int _read(void *data_out, int bytes_to_read, int *bytes_read, cef_resource_read_callback_t *callback)
128 {
129 if ((client_->response_length_ > 0 && bytes_read_ >= client_->response_length_) || (bytes_read_ >= (int64)data_.length() && client_->done_))
130 {
131 *bytes_read = 0;
132 return false;
133 }
134
135 int read = min_(bytes_to_read, static_cast<int>(data_.length() - bytes_read_));
136 memcpy(data_out, data_.c_str() + bytes_read_, read);
137
138 bytes_read_ += read;
139 *bytes_read = read;
140 return true;
141 }
142
143 static inline int min_(int a, int b)
144 {

Callers

nothing calls this directly

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected