Nrecv

Description
µ¥ÀÌÅ͸¦ Àд´Ù.

Syntax
S32 Nrecv(S32 s, S8 *buf, S32 len, S32 flags)

Parameters
s ¼ÒÄÏ ½Äº°ÀÚ
buf Àоî¿À´Â µ¥ÀÌÅÍ°¡ ÀúÀåµÉ ¹öÆÛ
len ÀоîµéÀÏ µ¥ÀÌÅÍÀÇ ÃÖ´ë ¹ÙÀÌÆ® ¼ö
flags MSG_OOB ±ä±Þ µ¥ÀÌÅ͸¦ ¹Ýȯ
MSG_PEEK Á¤º¸¸¦ ¹Ýȯ

Returns
-1 ¿¡·¯
>= 0 ÀоîµéÀÎ µ¥ÀÌÅÍÀÇ ¹ÙÀÌÆ® ¼ö

Comments
MSG_WAITALL ´Â Áö¿øÇÏÁö ¾Ê´Â´Ù.
¿¡·¯°¡ ³­ °æ¿ì¿¡ errno¿¡ ¿¡·¯ Äڵ尡 ÀúÀåµÈ´Ù. ÀúÀåµÇ´Â ¿¡·¯ÄÚµå´Â NreadsocketÀÇ °æ¿ì¿Í °°´Ù.

See Also
Nrecvfrom, Nrecvmsg

Example
S32 rc; /* return code */
S32 s;
U8 buff[BUFFLEN+1];
memset(&socka, 0, sizeof(socka));
...
rc = Nrecv(s, buff, 2, 0);
if ( rc < 0 )
   /* process error */
else if ( rc == 2 )
   Nprintf("read 2 bytes\n");
Else
   Nprintf("did not receive 2 bytes\n");