Network Programming for Microsoft Windows (Microsoft Professional Series)
NCBRECV
This command receives data from the specified session name. If more than one command capable of receiving data is pending, they are processed in the following order:
-
Receive (NCBRECV)
-
Receive-any for a specified name (NCBRECVANY)
-
Receive-any for any name (NCBRECVANY)
All commands with the same precedence are processed in first-in, first-out (FIFO) order. If the buffer passed is not large enough to hold the data, the error NRC_INCOMP (0x06) is returned. If this occurs, issue another receive command with a larger buffer unless the send command was issued with either a timeout that expired or a no-ack—in which case the data is lost. The ncb_length field is set to the amount of data actually read on return. Table 22-18 describes the characteristics of the NCBRECV command.
| Field | In/Out | Required |
| ncb_command | In | X |
| ncb_retcode | Out | |
| ncb_lsn | In | X |
| ncb_num | In | X |
| ncb_buffer | In | X |
| ncb_length | In/Out | X |
| ncb_callname | ||
| ncb_name | ||
| ncb_rto | ||
| ncb_sto | ||
| ncb_post | In | |
| ncb_lana_num | In | X |
| ncb_cmd_cplt | Out | |
| ncb_event | In |