*/
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');
*
* @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));
};