Tt_message m, n;
m = tt_message_create();
...
tt_message_send(m);
... wait around for tt_fd to become active
n = tt_message_receive();
if (m == n) {
// this is a reply to the message we sent
if (TT_HANDLED == tt_message_state(m)) {
// the receiver has handled the message, so we can go on
....
}
} else {
// this is some new message coming in
}
|