---
name: "mongoc_iovec_t"
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_iovec_t"
---

# mongoc\_iovec\_t(3)

## SYNOPSIS

## SYNOPSIS

```
#include <mongoc/mongoc.h>
#ifdef _WIN32
typedef struct {
   u_long iov_len;
   char *iov_base;
} mongoc_iovec_t;
#else
typedef struct iovec mongoc_iovec_t;
#endif
```

The **mongoc\_iovec\_t** structure is a portability abstraction for consumers of the *mongoc\_stream\_t* interfaces. It allows for scatter/gather I/O through the socket subsystem.

**WARNING:**

When writing portable code, beware of the ordering of **iov\_len** and **iov\_base** as they are different on various platforms. Therefore, you should not use C initializers for initialization.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
