mongoc_socket_recv (3) - Linux Manuals
mongoc_socket_recv: This function performs a recv() on the underlying socket.
Command to display mongoc_socket_recv
manual in Linux: $ man 3 mongoc_socket_recv
NAME
mongoc_socket_recv() - This function performs a recv() on the underlying socket.
SYNOPSIS
ssize_t
mongoc_socket_recv (mongoc_socket_t *sock,
void *buf,
size_t buflen,
int flags,
int64_t expire_at);
PARAMETERS
- sock
-
A
mongoc_socket_t
\&.
- buf
-
A buffer to read into.
- buflen
-
A size_t with the number of bytes to receive.
- flags
-
flags for
recv(3)
\&.
- expire_at
-
A int64_t with the time to expire in monotonic time using
bson_get_monotonic_time(3)
, which is in microseconds.
DESCRIPTION
This function performs a
recv(3)
on the underlying socket.
RETURNS
The number of bytes received on success, 0 on stream closed, and -1 if there was a failure and errno is set.
COLOPHON
This page is part of MongoDB C Driver.
Please report any bugs at
https://jira.mongodb.org/browse/CDRIVER.
Pages related to mongoc_socket_recv
- mongoc_socket_accept (3) - This function is a wrapper around the BSD socket accept() interface. It allows for more portability between UNIX-like and Microsoft Windows platforms.
- mongoc_socket_bind (3) - This function is a wrapper around the BSD socket bind() interface. It provides better portability between UNIX-like and Microsoft Windows platforms.
- mongoc_socket_close (3) - This function is a wrapper around the BSD socket shutdown() interface. It provides better portability between UNIX-like and Microsoft Windows platforms.
- mongoc_socket_connect (3) - This function is a wrapper around the BSD socket connect() interface. It provides better portability between UNIX-like and Microsoft Windows platforms.
- mongoc_socket_destroy (3) - This function releases all resources associated with a mongoc_socket_t. This should be called when you are no longer using the socket.
- mongoc_socket_errno (3) - This function returns the currently captured errno for a socket. This may be useful to check was the last errno was after another function call has been made that clears the threads errno variable.
- mongoc_socket_getnameinfo (3) - This is a helper around getting the local name of a socket. It is a wrapper around getpeername() and getnameinfo().
- mongoc_socket_getsockname (3) - Retrieves the socket name for sock. The result is stored in addr. addrlen should be the size of the addr when calling this.
- mongoc_socket_listen (3) - This function is similar to the BSD sockets listen() function. It is meant for socket servers.
- mongoc_socket_new (3) - Creates a new mongoc_socket_t structure. This calls socket() underneath to create a network socket.
- mongoc_socket_send (3) - Sends buflen bytes in buf to the destination. If a timeout expired, the number of bytes sent will be returned or -1 if no bytes were sent.
- mongoc_socket_sendv (3) - Sends a vector of buffers to the destination. This uses sendmsg() when available to perform a gathered write. If IOV_MAX is reached, a fallback will be used.
- mongoc_socket_setsockopt (3) - This is a helper function for setsockopt().
- mongoc_socket_t (3) - Portable socket abstraction
- mongoc_server_description_destroy (3) - This function cleans up all memory associated with the given server description.