Lines Matching refs:iovecs
37 * iovecs to point to the various pieces of the message. If that all works
51 * repeatedly, the iovecs is a template that must be copied, since in normal use
52 * the iovecs pointers and lengths get adjusted after every partial write.
55 REPMGR_IOVECS iovecs;
396 REPMGR_IOVECS iovecs;
455 * of iovecs for our use, since we destroy it in the process of
458 memcpy(&iovecs, &msg->iovecs, sizeof(iovecs));
460 while ((ret = __repmgr_writev(conn->fd, &iovecs.vectors[iovecs.offset],
461 iovecs.count-iovecs.offset, &nw)) == 0) {
463 if (__repmgr_update_consumed(&iovecs, nw)) /* all written */
815 __repmgr_iovec_init(&msg->iovecs);
817 __repmgr_add_buffer(&msg->iovecs, &msg->type, sizeof(msg->type));
821 __repmgr_add_buffer(&msg->iovecs,
827 &msg->iovecs, &msg->rec_size_buf, sizeof(msg->rec_size_buf));
830 __repmgr_add_dbt(&msg->iovecs, control);
833 __repmgr_add_dbt(&msg->iovecs, rec);
854 msg_size = msg->iovecs.total_bytes;
862 for (i = 0; i < msg->iovecs.count; i++) {
863 memcpy(p, msg->iovecs.vectors[i].iov_base,
864 msg->iovecs.vectors[i].iov_len);
865 p = &p[msg->iovecs.vectors[i].iov_len];
867 __repmgr_iovec_init(&msg->iovecs);
868 __repmgr_add_buffer(&msg->iovecs, &msg->fmsg->data[0], msg_size);