Sequencing long messages

An Open Server application stores the message text itself in the text field of the CS_SERVERMSG structure. text has a maximum length of CS_MAX_MSG bytes.

An Open Server application uses as many CS_SERVERMSG structures as necessary to return the full text of a message. The application returns the first CS_MAX_MSG bytes in one structure, the second CS_MAX_MSG bytes in a second structure, and so forth. This process is known as “chunking” the message.

An application calls srv_sendinfo as many times as there are “chunks”. If the entire message fits in one structure, the application only needs to call srv_sendinfo once.