MCPcopy Create free account
hub / github.com/BaseXdb/basex / read

Method read

basex-api/src/main/php/BaseXClient/Session.php:223–236  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221 }
222
223 private function read()
224 {
225 if ($this->bpos == $this->bsize) {
226 $this->bpos = 0;
227 $this->bsize = socket_recv($this->socket, $this->buffer, 4096, 0);
228 if ($this->bsize === false) {
229 throw $this->error("Read failed");
230 }
231 if ($this->bsize === 0) {
232 throw $this->error("Connection closed unexpectedly");
233 }
234 }
235 return $this->buffer[$this->bpos++];
236 }
237
238 private function sendCmd($code, $arg, $input)
239 {

Callers 2

readStringMethod · 0.95
okMethod · 0.95

Calls 1

errorMethod · 0.95

Tested by

no test coverage detected