1MONGOC_SOCKET_CONNECT(3) libmongoc MONGOC_SOCKET_CONNECT(3)
2
3
4
6 int
7 mongoc_socket_connect (mongoc_socket_t *sock,
8 const struct sockaddr *addr,
9 mongoc_socklen_t addrlen,
10 int64_t expire_at);
11
13 • sock: A mongoc_socket_t.
14
15 • addr: A struct sockaddr.
16
17 • addrlen: A mongoc_socklen_t.
18
19 • expire_at: A int64_t containing the absolute timeout using the mono‐
20 tonic clock.
21
23 This function is a wrapper around the BSD socket connect() interface.
24 It provides better portability between UNIX-like and Microsoft Windows
25 platforms.
26
27 This function performs a socket connection but will fail if expire_at
28 has been reached by the monotonic clock. Keep in mind that this is an
29 absolute timeout in milliseconds. You should add your desired timeout
30 to System Clock.
31
33 0 if successful, -1 on failure and errno is set.
34
36 MongoDB, Inc
37
39 2017-present, MongoDB, Inc
40
41
42
43
441.25.1 Nov 08, 2023 MONGOC_SOCKET_CONNECT(3)