nowelium / socket.io-titanium

socket.io for titanium mobile
http://youtu.be/10ogNjWCpyc
Other
136 stars 34 forks source link

Cannot call "clear" on undefined self._socketReadBuffer.clear() #12

Open jamespriso opened 12 years ago

jamespriso commented 12 years ago

Hi, i'm using Titanium 2.0 and Android 4.1 on windows7. I downloaded the folders socket.io and ti-websocket-client and also the file socket.io-titanium.js. I launched the server it works well and i've created a window for a simple test of connexion.

var win = Titanium.UI.currentWindow;

var io = require('./socketio');
var socket = io.connect('10.0.2.2:8080');
var chat = socket.of('/chat');

There is a main.js file where i created the window. My issue is, when i launch the app the server connects the client numerous times.

Alt Text After some minutes an error appears : Location(1231,32):ti-websocket-client/ti-websocket-client.js Message: Cannot call method 'clear' of undefined Source : self._socketReadBuffer.clear() I will be delighted if someone can help. thanks