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


amarquee.library/QInfoOp           amarquee.library/QInfoOp

   NAME
    QInfoOp - Request that the AMarquee server respond with an
              "info ping" message.

   SYNOPSIS
    #include 

    LONG QInfoOp(struct QSession * session)

   FUNCTION
    Works essentially the same as QPingOp, only the returned
    "ping" QMessage will have a struct QRunInfo as data, reflecting
    the current memory state of the AMarquee server.

    This function may also be used in direct client-to-client
    connections (as created via QNewSession and QNewHostSession),
    in which case the other client will receive an info QMessage.
    
   NOTE
    Of course, any memory state info sent to you by the AMarquee 
    server is very likely to be out of date by the time you get it!
    
    Also, when using the contents of QRunInfo to estimate how much
    information you can safely store on the AMarquee server, it
    will be helpful to know that the server makes a copy of everything
    it receives before deleting the original data, so qr_Avail should
    be AT LEAST 2 times the amount you wish to upload, and probably
    3 or 4 times is safer.
    
    Lastly, the QRunInfo struct will likely expand (in a compatible way)
    in future versions of AMarquee.
    
   INPUTS
    session - The session to send the info operation to.
    
   RESULTS
    Returns the assigned ID number of the ping operation or 0
    to indicate failure.  A ping QMessage (with a QRunInfo struct
    in the qm_Data field) will be returned asynchronously.
    
    The returned QRunInfo struct (defined in AMarquee.h) is as follows:

    struct QRunInfo
    {
      LONG qr_Allowed; /* The theoretical maximum number of bytes your server may allocate. */
      LONG qr_Alloced; /* The number of bytes currently allocated by your server. */
      LONG qr_Avail;   /* The number of bytes that may actually be allocated by your server. */
      ULONG qr_CurrentPrivs;  /* Bit chord of QPRIV_* values: privileges you currently enjoy */
      ULONG qr_PossiblePrivs; /* Bit chord of QPRIV_* values: privileges you can acquire */
    };

    qr_Allowed will be constant throughout your AMarquee session.
    qr_Alloced will depend solely on your program's actions.
    qr_Avail depends on qr_Allowed, qr_Avail, and also the amount of
    free memory available on the server computer.  It may change at
    any time.
    qr_CurrentPrivs can be set via calls to QRequestPrivilegesOp or 
    QReleasePrivilegesOp.  It can never
    contain bits that are not also in qr_PossiblePrivs field, though.

   EXAMPLE
    LONG transID;
    
    /* Send a ping to the server, that will be sent back ASAP */
    if (transID = QInfoOp(session))
       printf("Info op succeeded, was given id #%li\n",transID);
    else 
       printf("Info op failed.  (no memory?)\n");

   AREXX EXAMPLE
    transID = QInfoOp(session)
    if (transID = 0) then say "Oops, transaction failed."
           
   SEE ALSO
    QGo, QPingOp
    

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