---
name: "mongoc_client_pool_set_appname"
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_client_pool_set_appname"
---

# mongoc\_client\_pool\_set\_appname(3)

## SYNOPSIS

```
bool
mongoc_client_pool_set_appname (mongoc_client_pool_t *pool, const char *appname)
```

This function is identical to *mongoc\_client\_set\_appname()* except for client pools.

Also note that *mongoc\_client\_set\_appname()* cannot be called on a client retrieved from a client pool.

## PARAMETERS

- •

  **pool**: A *mongoc\_client\_pool\_t*.

- •

  **appname**: The application name, of length at most **MONGOC\_HANDSHAKE\_APPNAME\_MAX**.

## RETURNS

Returns true if appname was set. If appname is too long, returns false and logs an error.

## THREAD SAFETY

This function can only be called once on a pool, and must be called before the first call to *mongoc\_client\_pool\_pop()*.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
