---
name: "mongoc_client_set_sockettimeoutms"
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_set_sockettimeoutms"
---

# mongoc\_client\_set\_sockettimeoutms(3)

## SYNOPSIS

```
void
mongoc_client_set_sockettimeoutms (mongoc_client_t *client, int32_t timeoutms);
```

Change the **sockettimeoutms** of the *mongoc\_client\_t*.

If **client** was obtained from a *mongoc\_client\_pool\_t*, the socket timeout is restored to the previous value when calling *mongoc\_client\_pool\_push()*.

## PARAMETERS

- •

  **client**: A *mongoc\_client\_t*.

- •

  **timeoutms**: The requested timeout value in milliseconds.

**SEE ALSO:**

```
URI Connection Options
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
