UNPKG

pinus-robot

Version:

pinus-robot is a simple tool to benchmark the socket.io server's performance.

21 lines (17 loc) 434 B
/** * node abstract for agent node * */ Node.prototype.render = function() { var n = this; this._dom = $("#node_template").clone() .find(".node").html('[' +n.iport+ ']').end() .attr("id", "node_" + n.nodeId) .data('label', n.nodeId); // alert(this._dom.html()); // Add to control panel in alphabetical order $("#conndiv").append(n._dom); }; Node.prototype.destroy = function() { this._dom.remove(); };