Wow, this is really a unique browser, isn't it...
After spending long hours getting JSONP working
on Opera mini I thought it will work on just anything :)
Right.
1) Is it possible to easily run maple browser somehow?
(the emulator which requires registration and win7 is one
option, is there a simpler way?)
2) Is there a way to figure out if there isn't just a stupid
error javascript? Enable javascript debugging in the browser?
3) please capture traffic that goes from the sockjs-node server
to the browser (and back). To do this run something like:
$ sudo tcpdump -n -s0 port 8081 -w log.pcap
(please do review tcpdump manual page)
You should be able to open the pcap file in wireshark and verify
if you captured what's important.
I'd like to take a look at this dump to see if there is anything
obviously wrong.
I'll take a more detailed look on Monday.
Cheers,
Marek
Not true. Firebug lite is working just fine:
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js">
{
overrideConsole: true,
startInNewWindow: false,
startOpened: true,
enableTrace: true
}
</script>
> 3. I made capture sockets on both server side and client side using
> Wireshark. Can't see anything strange. The files are located in here:
>
> http://www.4shared.com/folder/O4-qPjmy/_online.html
>
> Please let me know if you need #1 set up. Thanks.
I updated your index.html:
https://gist.github.com/1978124
And it all works just fine. I think you had a bug in your code,
for example:
$('#input').val('>>>> '+Math.floor(Math.random()*10000));
$('#form').submit();
Why? Sockjs.send is what you need.
But whatever, see simplified code from the gist. I have no clue
how stable it is, does it leak memory and so on, but that's
your job :) For me the jsonp transport seems to be working
fine.
Cheers,
Marek
True.
> I applied the modified code. Same thing, even with sockjs.send(). I
> record a youtube clip:
>
> http://youtu.be/7Q8G0HS_mX4
Attaching screenshot of mine view. It's sending and receiving
messages correctly.
Marek
Right, even websockets were working - surprising!
To get 2.5.0 working, attach applied patch to sockjs-client,
regenerate the javascript (sockjs.js) and try running it.
There are two bugs.
1)
- area.value = null;
+ area.value = '';
For some reason maple doesn't like applying null to the 'value'
parameter - I'm happy to fix that. It shouldn't hurt.
2)
+ setTimeout(completed, 1000);
Sending data through JSONP relies on a weird trick. This includes
creating a fake <form>, and setting its target to the id of a fake <iframe>
object. That way by looking at the 'onreadystate'/'readyState' propery
of an Iframe we can understand whether we're done with the send.
Basically - we need to know when the form got through.
This doesn't work on maple. Adding this stupid timer forces
sockjs to think that the form indeed went through successfully
after a second.
This is generally wrong for networks with latency > 1s, and
thus I'm not going to include that in released SockJS client.
There may be another way of getting this information out
of the browser, but it's a lot of work. Suggestions welcome.
Cheers,
Marek