return r;
}
- // fill by readin from the given fd, until at least the specified number of bytes are in
+ // fill by reading from the given fd, until at least the specified number of bytes are in
// the buffer. Return 0 if end-of-file reached before fill complete, or -1 on error.
- int fillTo(int fd, int rlength) noexcept
+ int fill_to(int fd, int rlength) noexcept
{
while (length < rlength) {
int r = fill(fd);
static void fillBufferTo(CPBuffer<1024> *buf, int fd, int rlength)
{
- int r = buf->fillTo(fd, rlength);
+ int r = buf->fill_to(fd, rlength);
if (r == -1) {
throw ReadCPException(errno);
}
}
// Wait until service started:
- r = rbuffer.fillTo(socknum, 2);
+ r = rbuffer.fill_to(socknum, 2);
while (r > 0) {
if (rbuffer[0] >= 100) {
int pktlen = (unsigned char) rbuffer[1];
}
rbuffer.consume(pktlen);
- r = rbuffer.fillTo(socknum, 2);
+ r = rbuffer.fill_to(socknum, 2);
}
else {
// Not an information packet?