dojox/cometd/ack.js

  • Provides:

    • dojox.cometd.ack
  • Requires:

    • dojox.cometd._base in common
  • dojox.cometd._ack

    • type
      Function
    • ?? initialized = 1 (debug: boolean) ??
    • source: [view]
       var supportAcks = false;
       var lastAck = -1;

       
       this._in = function(msg){
        if (msg.channel == "/meta/handshake") {
         supportAcks = msg.ext && msg.ext.ack;
        } else if (supportAcks && msg.channel == "/meta/connect" && msg.ext && msg.ext.ack && msg.successful) {
         var ackId = parseInt(msg.ext.ack);
         lastAck = ackId;
        }
        return msg;
       }

       
       this._out = function(msg){

       
        if (msg.channel == "/meta/handshake") {
         if (!msg.ext)
          msg.ext = {};
         msg.ext.ack = dojox.cometd.ackEnabled;
         lastAck = -1;
        }
        if (supportAcks && msg.channel == "/meta/connect") {
         if (!msg.ext)
          msg.ext = {};
         msg.ext.ack = lastAck;
        }
        return msg;
       }
    • summary
  • dojox.cometd._ack._in

    • type
      Function
    • parameters:
      • msg: (typeof )
    • source: [view]
        if (msg.channel == "/meta/handshake") {
         supportAcks = msg.ext && msg.ext.ack;
        } else if (supportAcks && msg.channel == "/meta/connect" && msg.ext && msg.ext.ack && msg.successful) {
         var ackId = parseInt(msg.ext.ack);
         lastAck = ackId;
        }
        return msg;
    • summary
  • dojox.cometd._ack._out

    • type
      Function
    • parameters:
      • msg: (typeof )
    • source: [view]
        if (msg.channel == "/meta/handshake") {
         if (!msg.ext)
          msg.ext = {};
         msg.ext.ack = dojox.cometd.ackEnabled;
         lastAck = -1;
        }
        if (supportAcks && msg.channel == "/meta/connect") {
         if (!msg.ext)
          msg.ext = {};
         msg.ext.ack = lastAck;
        }
        return msg;
    • summary
  • dojox.cometd.ackEnabled

    • summary
  • dojox.cometd.ack

    • type
      Object
    • summary
  • dojox.cometd

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary