MCPcopy Create free account
hub / github.com/acl-dev/acl / read

Method read

lib_acl_cpp/src/stream/istream.cpp:25–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23#endif
24
25int istream::read(void* buf, size_t size, bool loop /* = true */)
26{
27 int ret;
28 if (buf == NULL || size == 0) {
29 return -1;
30 }
31
32 if (loop && size > 1 && !(stream_->type & ACL_VSTREAM_TYPE_DGRAM)) {
33 ret = acl_vstream_readn(stream_, buf, size);
34 } else {
35 ret = acl_vstream_read(stream_, buf, size);
36 }
37 if (ret == ACL_VSTREAM_EOF) {
38 CHECK_ERROR(errno);
39 return -1;
40 }
41 return ret;
42}
43
44bool istream::readtags(void *buf, size_t* size, const char *tag, size_t taglen)
45{

Callers 15

client_echoFunction · 0.45
fiber_mainFunction · 0.45
server_pool2_runFunction · 0.45
server_pool_runFunction · 0.45
mainFunction · 0.45
handle_clientMethod · 0.45
transferMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
user_loginMethod · 0.45
handle_clientFunction · 0.45

Calls 7

acl_vstream_readnFunction · 0.85
acl_vstream_readFunction · 0.85
bufMethod · 0.80
capacityMethod · 0.80
readFunction · 0.50
clearMethod · 0.45
spaceMethod · 0.45

Tested by 2

echoMethod · 0.36
test_zlib_pipeFunction · 0.36