Exchanging Data During a PPC Session
After a session begins, each application can send data to and receive data from
the other using a sequence of message blocks. The PPC Toolbox treats each message block as a byte stream and does not interpret the contents of the
message block. The size of a message block can be between 0 and (232-1) bytes. The PPC Toolbox treats the buffer size as an unsigned long integer. The PPC Toolbox delivers the message blocks in the same sequence as they are sent and without duplicates. In the following picture, an application
transmits message blocks during a session.
Transmitting message blocks
For each message block, you specify a block creator, block type, and
user data. The first PPCWrite function that you use to create a new message block sets the attributes for the block. The PPCRead function returns the block creator, block type, and user data attributes for the current message
block when the call completes.
Although the PPC Toolbox does not interpret these attributes, they can give the receiving application information about how to process the contents of the
message block. For example, a database application may specify a counter to
indicate the block number (block number 20 of 30 total blocks) in the block
creator field. This application could also specify a code, such as 'DREC', in the
block type field to indicate that the information it contains is a database record.
In addition, this application could specify the length of the message block in the
user data field.