X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=StdLib%2FBsdSocketLib%2Frecv.c;h=0ad7252c4490909a8ce4b9f82113acc4a63d6cf3;hb=7700f0f5c0ab90bf052e33fa0ddd2f2aa7e7893e;hp=735e1dbddd1a657e7233e4f7f6c47a7d85dd969e;hpb=d7ce700605e1af0e455e31ec11f19ff21d26b525;p=mirror_edk2.git diff --git a/StdLib/BsdSocketLib/recv.c b/StdLib/BsdSocketLib/recv.c index 735e1dbddd..0ad7252c44 100644 --- a/StdLib/BsdSocketLib/recv.c +++ b/StdLib/BsdSocketLib/recv.c @@ -18,22 +18,26 @@ /** Receive data from a network connection. - The ::recv routine waits for receive data from a remote network - connection. The + The recv routine waits for receive data from a remote network + connection. This routine is typically used for SOCK_STREAM + because it waits for receive data from the target system specified + in the ::connect call. + + The POSIX documentation is available online. @param [in] s Socket file descriptor returned from ::socket. @param [in] buffer Address of a buffer to receive the data. - + @param [in] length Length of the buffer in bytes. @param [in] flags Message control flags - @returns ::recv returns the number of valid bytes in the buffer, + @return This routine returns the number of valid bytes in the buffer, zero if no data was received, and -1 when an error occurs. - In the case of an error, errno contains more details. + In the case of an error, ::errno contains more details. **/ ssize_t @@ -45,7 +49,7 @@ recv ( ) { ssize_t BytesRead; - + // // Receive the data from the remote system //