Skip to content

OryUIHTTPSQueue

Kevin Cross edited this page Jun 28, 2020 · 3 revisions

Available Functions

OryUIAddItemToHTTPSQueue(httpsQueueID, itemParameters$)

Adds an item to the https queue.

OryUIClearHTTPSQueue(httpsQueueID)

Clears all items from a https queue.

OryUICreateHTTPSQueue(parameters$)

Creates a https queue.

OryUIDeleteHTTPSQueue(httpsQueueID)

Deletes a https queue.

OryUIFindNameInHTTPSQueue(httpsQueueID, name$)

Searches for and returns the index/slot number where a match was found.

OryUIFindScriptInHTTPSQueue(httpsQueueID, script$)

Searches for and returns the index/slot number where a match was found.

OryUIGetHTTPSQueueFailedCount(httpsQueueID)

Returns the number of times the https queue has failed to gain a success response code.

OryUIGetHTTPSQueueItemCount(httpsQueueID)

Returns the number of items in the https queue.

OryUIGetHTTPSQueueRequestName(httpsQueueID)

Returns the last successful https queue request name.

OryUIGetHTTPSQueueRequestResponse(httpsQueueID)

Returns the last successful https queue response.

OryUIGetHTTPSQueueRequestResponseCode(httpsQueueID)

Returns the last successful https queue response code.

OryUIGetHTTPSQueueRequestScript(httpsQueueID)

Returns the last successful https queue script name.

OryUIInsertHTTPSQueueListener(httpsQueueID)

Required to control the https queue.

OryUIIsNameInHTTPSQueue(httpsQueueID, name$)

Searches for and returns true (1) where a match was found.

OryUIIsScriptInHTTPSQueue(httpsQueueID, name$)

Searches for and returns true (1) where a match was found.

OryUIPrintHTTPSQueue(httpsQueueID)

Prints a log on screen of the https queue and the items within it.

OryUIUpdateHTTPSQueue(httpsQueueID, parameters$)

Updates a https queue. See Available Parameters section below for the options.

Available Queue Parameters

Parameter Description
delay The delay/pause that should be applied between each request.
domain The domain name the https requests are being sent to. Required.
ssl Whether or not the https request are being sent via ssl or not.
timeout The maximum time in milliseconds before a request times out.

Available Queue Item Parameters

Parameter Description
addToFront Whether or not to add item to the front of the queue.
file The file that's being sent to the server.
name The unique name to give to the queue item.
postData The post data that is being sent to the server. i.e. username=OryUI&topScore=10000
script The page on the server that the data is being sent to.
stickUntilComplete Whether or not the item should stay in the first slot of the queue until completed/successful.

Example Code

Example

queue = OryUICreateHTTPSQueue("domain:mygame.com;ssl:true;timeout:10000")
OryUIAddItemToHTTPSQueue(queue, "name:UpdateScoreBoard;script:/app/updatescoreboard.php;postData:username=OryUI&score=10000;addToFront:true;stickUntilComplete:true")
OryUIAddItemToHTTPSQueue(queue, "name:GetScoreBoard;script:/app/getscoreboard.php")

do
    // All of your main app code here.
    // ...
    OryUIInsertHTTPSQueueListener(queue)
    if (OryUIGetHTTPSQueueRequestScript(queue) = "app/getscoreboard.php")
        ReceivedScoreBoardData()
    elseif (OryUIGetHTTPSQueueRequestScript(queue) = "app/updatescoreboard.php")
        // Score board updated
        // ... do something
    endif

    Sync()
loop

Clone this wiki locally