Javascript Array clientExists(p)
Array.prototype.clientExists = function (p) { var length = this.length; for(var i = 0; i < length; i++) { if(this[i].ip == p.ip && this[i].port == p.port) return true; }/* w ww . j a v a 2 s . c o m*/ return false; }