Exemplo n.º 1
0
static void
s_order_update (order_t *self, int volume)
{
    assert (self);
    assert (volume <= self->volume);
    self->volume -= volume;

    //  Prepare and send report to the client
    zmsg_t *report = zmsg_new ();
    zmsg_pushstrf (report, "%d", volume);

    if (self->volume == 0)
        zmsg_pushstr (report, "FILL");
    else
        zmsg_pushstr (report, "PARTIAL_FILL");

    mdp_worker_send (self->worker, &report, self->reply_to);
}
Exemplo n.º 2
0
///
//  Push formatted string as new frame to front of message.
//  Returns 0 on success, -1 on error.                     
int QmlZmsg::pushstrf (const QString &format) {
    return zmsg_pushstrf (self, "%s", format.toUtf8().data());
};
Exemplo n.º 3
0
///
//  Push formatted string as new frame to front of message.
//  Returns 0 on success, -1 on error.                     
int QZmsg::pushstrf (const QString &param)
{
    int rv = zmsg_pushstrf (self, "%s", param.toUtf8().data());
    return rv;
}