D | shared_buf.cc | 51 ssize_t read = 0; in ReadExact() local 52 while ((read = fd->Read((void*)&(buf[total_read]), size - total_read)) > 0) { in ReadExact() 53 if (read < 0) { in ReadExact() 55 return read; in ReadExact() 57 total_read += read; in ReadExact() 68 ssize_t read; in ReadAll() local 69 while ((read = fd->Read(buff, BUFF_SIZE - 1)) > 0) { in ReadAll() 71 ss << std::string(buff, read); in ReadAll() 73 if (read < 0) { in ReadAll() 75 return read; in ReadAll()
|