[ticker-dev] Timeout attribute

David Arnold arnold at dstc.edu.au
Mon Mar 22 03:16:03 CST 2004


-->"Ian" == Ian Lister <ticker-lists at lister.dnsalias.net> writes:

  Ian> Alternatively you can just use the v1 attribute if it exists to
  Ian> be certain.

In fact, this is the best approach for messages with v1 data present,
which slightly modifies my proposed alorithm for reception:

    if (msg.containsKey("TIMEOUT")) {
        timeout = msg.getInt("TIMEOUT") * 60;
    } else if (msg.containsKey("Timeout")) {
        msgTimeout = msg.getInt("Timeout");

	if ((msgTimeout > 0 && msgTimeout <= 60) || msgTimeout == 1440) {
	    timeout = msgTimeout * 60;
	} else {
	    timeout = msgTimeout;
        }
    }

transmission is the same:

    v1Timeout = uiTimeout;
    if (uiTimeout == 1) {
        v3Timeout = 61;
    } else {
        v3Timeout = uiTImeout * 60;
    }


or something like that :-)




d


More information about the ticker-dev mailing list