Transaction Object

Top  Previous  Next

The transaction object holds all data related to the transaction. Note that lua holds the ownership over this object so make sure it's not garbage collected before the transaction finished or you'll have a hard to find bug in your code.






timeout( number )

Sets the timeout in milliseconds.


data ( string )

Sets the data to send.


persistent( boolean )

Sets the persistent flag



Removes the internal hooks to the callback functions to prevent cyclic references which could prevent garbage collection of the transaction object and eventually lead to an out of memory error on Girder.

TransactionObject::timeout( [number] )

Set or query the timeout for this object. You can reset the timeout from the timeout callback or the data arrived callback with the TX_RESET_TIMEOUT result status. (Default = 0)

TransactionObject::data( [string] )

Sets or queries the data to send

TransactionObject::persistent ( [boolean] )

Sets or queries the persistent flag. This flag determines if a transaction goes into the persistent queue or not. (Default = false)

TransactionObject::removeCallbacks ( )

Removes the callbacks for this transaction. After this call the callsbacks will no longer be called, make sure you pass TX_REMOVE in the result set.


Connection Object