---
name: "mongoc_topology_description_get_servers"
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_topology_description_get_servers"
---

# mongoc\_topology\_description\_get\_servers(3)

## SYNOPSIS

```
mongoc_server_description_t **
mongoc_topology_description_get_servers (
   const mongoc_topology_description_t *td,
   size_t *n);
```

Fetches an array of *mongoc\_server\_description\_t* structs for all known servers in the topology.

## PARAMETERS

- •

  **td**: A *mongoc\_topology\_description\_t*.

- •

  **n**: Receives the length of the descriptions array.

## RETURNS

A newly allocated array that must be freed with *mongoc\_server\_descriptions\_destroy\_all()*.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
