| Previous | Contents | Index | 
Sequentially read a message from disk.
int POPSTORE_message_read (message_context, buffer, buffer_len, bytes_read) int message_context; char *buffer; int buffer_len; int *bytes_read;
Message context returned by a previous call to
message_contextPOPSTORE_message_begin. Used for input only.Pointer to a buffer into which to read message data. Used for output only.
bufferMaximum length in bytes of the buffer. Used for input only.
buffer_lenOn output, the number of bytes read and stored in the buffer. Used for output only.
bytes_read
A message accessed with a call toPOPSTORE_message_begincan be sequentially read withPOPSTORE_message_read.POPSTORE_message_readwill read up tobuflen-1bytes of data, storing them in the buffer pointed at bybufferand terminating the data with a null.POPSTORE_message_readshould be repeatedly called until either POPSTORE_EOM or an error is returned. Note that whenPOPSTORE_EOMis returned, data can also have been returned as indicated by a non-zero value forbytes_read. Note that the data returned byPOPSTORE_message_readwill have embedded CRLF pairs marking the end of message records. Moreover, the data will be "dot stuffed" as per the POP protocol. An example of usingPOPSTORE_message_readis given in Example 12-8.
POPSTORE_SUCCESS Normal, successful completion. POPSTORE_EOM End of message reached; normal, successful completion. POPSTORE_READERROR Error reading message file. 
| Previous | Next | Contents | Index |