Hi i have my CIMD application up and running but im not exactly sure if my communications with the server are correct.

Imagine I have one app which sends 30 messages to my account number.
The second app then proceeds to pick them up from this same number.

Now this is the bit im not sure about.
I want the app to pick them up one at a time.

I do a
which basically asks for the oldest message to be delivered.

When i first run my receiving app i send this string then keep reading the input untill i get the response

Just after running the app and in between sending and receiving the above two messages i get lots of unsolicited delivery messages (which is expected of course), about 10 in one go usually

something like ...
<stx>20:016<tab>021:51078<tab>023:51078<tab>060:030721182441<tab>033:TEST MSG:15<tab>052:0<tab>030:0<tab>069:358402110099<tab>4C<etx>

I reply to the first one with something like

and ignore the rest, the idea is to get them next time round the loop

now my question is this.

I thought if i ignore the messages they will get sent automatically again later.
But nearly every time from this point on when i send the command


i only get


but i would expect to get a message back here somehow?
This is the bit im not sure of!

does this command force the oldest message to be sent as a <stx>20:016<tab>
type packet?
or does it come some other way?

it seems from watching the output that from this point on i get a new msg/delivery sent to me now every minute or so, is this from me asking for it or is this the system automatically sending them again to me?

How should the correct sequence look?

Should the correct sequence look like this?
(with some parameters missed out for clarity!- and ignore packet numbers!)

Sending: <stx>05:049<tab>068:1<tab><etx>
Received: <stx>20:114<tab>033:TEST MSG:28<tab>etx>
Sending: <stx>70:014<tab><etx>
Received: <stx>55:097<tab>4F<etx>

or this...

Sending: <stx>05:049<tab>068:1<tab><etx>
Received: <stx>55:097<tab>4F<etx>
Received: <stx>20:114<tab>033:TEST MSG:28<tab>etx>
Sending: <stx>70:014<tab><etx>

Thanks for any help you can give