[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

    CxSender -- create a commodity sender object. (V36)

    senderObj = CxSender(port,id)

    CxObj *CxSender(struct MsgPort *,LONG);

    This function creates a Commodities sender object. The action
    of this object on receiving a Commodities message is to copy the
    Commodities message into a standard Exec Message, to put the value
    'id' in the message as well, and to send the message off to the
    message port 'port'.

    The value 'id' is used so that an application can monitor
    messages from several senders at a single port. It can be retrieved
    from the Exec message by using the function CxMsgID(). The value can
    be a simple integer ID, or a pointer to some application data

    Note that Exec messages sent by sender objects arrive
    asynchronously at the destination port. Do not assume anything about
    the status of the Commodities message which was copied into the Exec
    message you received.

    All Exec messages sent to your ports must be replied. Messages may be
    replied after the sender object has been deleted.

    This function is a C-language macro for CreateCxObj(), defined
    in <libraries/commodities.h>.

    port - the port for the sender to send messages to
    id - the id of the messages sent by the sender

    semderObj - a pointer to the sender object, or NULL if it could
                not be created.

    commodities.library/CreateCxObj(), commodities.library/CxMsgID(),
    exec.library/PutMsg(), exec.library/ReplyMsg()

[Back to Amiga Developer Docs]