X-Git-Url: https://git.wh0rd.org/?p=chrome-ext%2Fmusic-player-client.git;a=blobdiff_plain;f=js%2Ftcp-client.js;h=ed3b598126db85ed7b51d930337771921bc58fe1;hp=c46921f2396d48d263e326f9ed7c04dd08ec3798;hb=ee26ebe43d89016c3014e030041e363e337f4ff5;hpb=d4a26e736741a0a75acc6742d075d1cf7a11a44c diff --git a/js/tcp-client.js b/js/tcp-client.js index c46921f..ed3b598 100644 --- a/js/tcp-client.js +++ b/js/tcp-client.js @@ -124,7 +124,7 @@ Author: Boris Smus (smus@chromium.org) */ TcpClient.prototype._onConnectComplete = function(resultCode) { // Start polling for reads. - setInterval(this._periodicallyRead.bind(this), 500); + setInterval(this.poll.bind(this), 500); if (this.callbacks.connect) { log('connect complete'); @@ -138,7 +138,7 @@ Author: Boris Smus (smus@chromium.org) * * @see http://developer.chrome.com/apps/socket.html#method-read */ - TcpClient.prototype._periodicallyRead = function() { + TcpClient.prototype.poll = function() { socket.read(this.socketId, null, this._onDataRead.bind(this)); };