---
name: "mongoc_socket_sendv"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_socket_sendv"
---

# mongoc\_socket\_sendv(3)

## SYNOPSIS

```
ssize_t
mongoc_socket_sendv (mongoc_socket_t *sock,
                     mongoc_iovec_t *iov,
                     size_t iovcnt,
                     int64_t expire_at);
```

## PARAMETERS

- •

  **sock**: A *mongoc\_socket\_t*.

- •

  **iov**: A mongoc\_iovec\_t.

- •

  **iovcnt**: A size\_t containing the number of elements in iov.

- •

  **expire\_at**: A int64\_t with absolute timeout in monotonic time. The monotonic clock is in microseconds and can be fetched using *System Clock*.

## DESCRIPTION

Sends a vector of buffers to the destination. This uses **sendmsg()** when available to perform a gathered write. If IOV\_MAX is reached, a fallback will be used.

## RETURNS

the number of bytes sent on success, or -1 on failure and errno is set.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
