G2 Mailslot Example

Overview

This demonstration focuses on building up complex messages and correctly extracting those messages and should be examined by sockets users who also wish to perform complex message reading/writing.

Essentially, each message is built up out of an MIO-DEMO-INFO object, which has three attributes, each of a type integer, text and float. The important point is that the integer attribute (mio-int) always contains the length of the text attribute (mio-string).

The demo writes messages marshalled from the attributes of a MIO-DEMO-INFO (named mio-demo-info-write) to a mailslot and then reads them back into the attributes of mio-demo-info-read.

1.    Connect idx-mio-demo-interface to IDX by selecting its idx-connect menu option.

2.    Create the mailslot by selecting the Open menu option from mailslot-demo-read.

3.    Establish a write connection to the mailslot by selecting the Open menu option from mailslot-demo-write.

4.    Write several messages to the mailslot by clicking the 'Write information' button several times. Examine the procedure called to see how each message is marshalled from mio-demo-info-write.

5.    Click the 'Read Information' button several times to read the messages into mio-demo-info-read. Examine the called procedure to see how each message is un-marshalled into the attributes of mio-demo-info-read.

images\g2eximage2.jpg