.\" This manpage is Copyright (C) 2016 MongoDB, Inc. .\" .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.3 .\" or any later version published by the Free Software Foundation; .\" with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. .\" A copy of the license is included in the section entitled "GNU .\" Free Documentation License". .\" .TH "MONGOC_SOCKET_RECV" "3" "2016\(hy10\(hy12" "MongoDB C Driver" .SH NAME mongoc_socket_recv() \- This function performs a recv() on the underlying socket. .SH "SYNOPSIS" .nf .nf ssize_t mongoc_socket_recv (mongoc_socket_t *sock, void *buf, size_t buflen, int flags, int64_t expire_at); .fi .fi .SH "PARAMETERS" .TP .B sock A .B mongoc_socket_t . .LP .TP .B buf A buffer to read into. .LP .TP .B buflen A size_t with the number of bytes to receive. .LP .TP .B flags flags for .B recv(3) . .LP .TP .B expire_at A int64_t with the time to expire in monotonic time using .B bson_get_monotonic_time(3) , which is in microseconds. .LP .SH "DESCRIPTION" This function performs a .B recv(3) on the underlying socket. .SH "RETURNS" The number of bytes received on success, 0 on stream closed, and \(hy1 if there was a failure and errno is set. .B .SH COLOPHON This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.