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