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

amarquee.library/QStreamOp           amarquee.library/QStreamOp

   NAME
    QStreamOp - Create or update a data item with a new buffer of data.
                Use data streaming so that other clients will not miss
                any updates, even if you don't use any synchronization.

   SYNOPSIS
    #include 

    LONG QStreamOp(struct QSession * session, char * path, void * buffer, ULONG bufferLength)

   FUNCTION
    This function works essentially the same as QSetOp, except that
    you do not need to worry about data synchronization problems (e.g.
    changing the data in a node a second time before some clients had
    read the first value).  Instead, the AMarquee server will ensure 
    that all stream updates are seen by all interested clients, in the
    order they were sent.

    In direct client-to-client connections, this function operates
    exactly the same as QSetOp does.
    
   NOTE
    You may only stream nodes in your own directory.

    QStreamOp is less memory-efficient on the server side than QSetOp 
    is, because the server may have to keep around multiple revisions
    of your data in the node you QStreamOp on.
    
    This feature requires v38+ of amarquee.library, and v1.10B+
    of AMarqueed.
    
   INPUTS
    session      - The session to wish to send the stream op to.
    path         - The regular path of the node you wish to create
                   or update.  Wildcards are not allowed here.
    buffer       - A pointer to the first byte of the data buffer you
                   wish to upload, or NULL if you wish to delete an
                   existing node specified by "path".
    bufferLength - The length of the data buffer, in bytes.
    
   RESULTS
    Returns the assigned ID number of the stream operation on success,
    or 0 on failure.  Any server-side errors will be sent asynchronously
    as QMessages.

   EXAMPLE
    LONG transID;
    LONG data[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};    
    
    /* Stream Upload the data array into a node named "data" in our home dir */
    if (transID = QStreamOp(session, "data", data, sizeof(data)))
       printf("Stream op succeeded, was given id #%li\n",transID);
    else 
       printf("Stream op failed.  (no memory?)\n");

   AREXX NOTES
    In ARexx, the fourth argument is optional.  If it is not specified,
    then the length of the third argument will be computed automatically
    so that the entire ARexx string is sent.  (that is, it defaults to
    length(data)+1.  Note that if you specify the fourth argument to
    be a value of less than that, it will be stored on the server as
    an unterminated character array!)

   AREXX EXAMPLE
    transID = QStreamOp(session, 'myName', 'Fred')
    if (transID = 0) then say "Oops, operation failed"
        
   SEE ALSO
    QGo, QSetOp
    

Converted on 24 Mar 2002 with RexxDoesAmigaGuide2HTML 2.1e(private) by Michael Ranner.