Lines Matching refs:buf

68 static ssize_t tcp_read(conn *arg, void *buf, size_t count);
70 static ssize_t tcp_write(conn *arg, void *buf, size_t count);
131 ssize_t tcp_read(conn *c, void *buf, size_t count) { in tcp_read() argument
133 return read(c->sfd, buf, count); in tcp_read()
141 ssize_t tcp_write(conn *c, void *buf, size_t count) { in tcp_write() argument
143 return write(c->sfd, buf, count); in tcp_write()
1014 void resp_add_iov(mc_resp *resp, const void *buf, int len) { in resp_add_iov() argument
1017 resp->iov[x].iov_base = (void *)buf; in resp_add_iov()
1026 void resp_add_chunked_iov(mc_resp *resp, const void *buf, int len) { in resp_add_chunked_iov() argument
1029 resp_add_iov(resp, buf, len); in resp_add_chunked_iov()
1316 char *buf = c->stats.buffer + c->stats.offset; in append_bin_stats() local
1327 memcpy(buf, header.bytes, sizeof(header.response)); in append_bin_stats()
1328 buf += sizeof(header.response); in append_bin_stats()
1331 memcpy(buf, key, klen); in append_bin_stats()
1332 buf += klen; in append_bin_stats()
1335 memcpy(buf, val, vlen); in append_bin_stats()
1740 void write_and_free(conn *c, char *buf, int bytes) { in write_and_free() argument
1741 if (buf) { in write_and_free()
1743 resp->write_and_free = buf; in write_and_free()
1744 resp_add_iov(resp, buf, bytes); in write_and_free()
2267 char *buf, uint64_t *cas, argument
2323 itoa_u64(value, buf);
2324 res = strlen(buf);
2337 memcpy(ITEM_data(it), buf, res);
2349 memcpy(ITEM_data(new_it), buf, res);
2428 unsigned char *buf = (unsigned char *)c->rbuf; local
2434 c->request_id = buf[0] * 256 + buf[1];
2437 if (buf[4] != 0 || buf[5] != 1) {
4725 char *buf; local
5171 buf = strdup(optarg);
5172 unit = buf[strlen(buf)-1];
5175 buf[strlen(buf)-1] = '\0';
5176 size_max = atoi(buf);
5183 settings.item_size_max = atoi(buf);
5185 free(buf);