Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (20 sloc) 0.882 kb
# s2.2.5.3
# For now, only the "Transaction Descriptor" header (s2.2.5.3.2) is supported.
WritableTrackingBuffer = require('./tracking-buffer/tracking-buffer').WritableTrackingBuffer
TYPE =
QUERY_NOTIFICATIONS: 1
TXN_DESCRIPTOR: 2
TRACE_ACTIVITY: 3
TXNDESCRIPTOR_HEADER_DATA_LEN = 4 + 8
TXNDESCRIPTOR_HEADER_LEN = 4 + 2 + TXNDESCRIPTOR_HEADER_DATA_LEN
exports.writeToTrackingBuffer = (buffer, txnDescriptor, outstandingRequestCount) ->
buffer.writeUInt32LE(0) # Will write buffer length in here later.
buffer.writeUInt32LE(TXNDESCRIPTOR_HEADER_LEN)
buffer.writeUInt16LE(TYPE.TXN_DESCRIPTOR)
buffer.writeUInt32LE(txnDescriptor & 0xFFFFFFFF)
buffer.writeUInt32LE(txnDescriptor >> 32)
buffer.writeUInt32LE(outstandingRequestCount)
data = buffer.data
# Write deferred buffer length.
data.writeUInt32LE(data.length, 0)
buffer
Jump to Line
Something went wrong with that request. Please try again.