Where is the source-code-host for autobahn.js? I want to submit a tiny bug fix

#1

Hi

I have added graceful fallback for autobahn.js in my project, that is done by loading an extra Javascript file.

Within this javascript file, it simulates WebSocket object and send / receive the messages via comet.

function WebSocket(){
var me = this;
me.protocol = “wamp”;
me.onopen = null;
me.onmessage = null;
me.onclose = null;

}

It works very well in my project, I can use autobahn.js in obsoleted web browsers like IE7 and there is no difference from developer’s aspect when performing operation via autobahn.js.

Except there is a tiny bug in autobahn.js in old web browser when it tries to reconnect,

At Line 3260 and 3291

window.setTimeout(ab._connect, peer.options.retryDelay, peer);

It should be modified to

var fun = (function § { return function () { ab._connect§; } })(peer);
window.setTimeout(fun, peer.options.retryDelay);

The 3 parameter of setTimeout is not recognized by old web browsers.

Can anyone help :slight_smile: ?

0 Likes

#2

Jerry,

source code is hosted at

https://github.com/tavendo/AutobahnJS

You can submit issues and pull requests there ..

/Tobias

>

Within this javascript file, it simulates *WebSocket* object and send /
receive the messages via comet.

    function WebSocket(){
    var me = this;
    me.protocol = "wamp";
    me.onopen = null;
    me.onmessage = null;
    me.onclose = null;
    ....
    }

It works very well in my project, I can use *autobahn.js* in obsoleted
web browsers like IE7 and there is no difference from developer's aspect
when performing operation via *autobahn.js*.

How do you process WAMP over Comet on server-side?

/Tobias

···

Except there is a tiny bug in *autobahn.js* in old web browser when it
tries to reconnect,

At Line 3260 and 3291

    window.setTimeout(ab._connect, peer.options.retryDelay, peer);

  It should be modified to

    var fun = (function (p) { return function () { ab._connect(p); }
    })(peer);
    window.setTimeout(fun, peer.options.retryDelay);

The 3 parameter of *setTimeout* is not recognized by old web browsers.

Can anyone help :slight_smile: ?

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Likes

#3

Thanks, I have submited an issue here https://github.com/tavendo/AutobahnJS/issues/31

In my project, I design the server in this way:

A websocket server basing on SuperWebSocket , accepts normal websocket connections.

A web application accepts normal HTTP connections which provides commet mechanism.

Both of them only accept websocket or normal connections, they don’t process any business.

After they receives the requests, transform and append to Redis queue.

And there are several backend servers, which receives the request from Redis and process.

I implemented the WAMP protocol on server side from zero.

and the application supports both features (RPC / PubSub).

It can’t be explained in one sentence, I have a detailed design document. If you want, I can send email to you in private.

Br

···

On Sunday, August 25, 2013 12:24:41 PM UTC, Tobias Oberstein wrote:

Jerry,

source code is hosted at

https://github.com/tavendo/AutobahnJS

You can submit issues and pull requests there …

/Tobias

Within this javascript file, it simulates WebSocket object and send /

receive the messages via comet.

function WebSocket(){
var me = this;
me.protocol = "wamp";
me.onopen = null;
me.onmessage = null;
me.onclose = null;
....
}

It works very well in my project, I can use autobahn.js in obsoleted

web browsers like IE7 and there is no difference from developer’s aspect

when performing operation via autobahn.js.

How do you process WAMP over Comet on server-side?

/Tobias

Except there is a tiny bug in autobahn.js in old web browser when it

tries to reconnect,

At Line 3260 and 3291

window.setTimeout(ab._connect, peer.options.retryDelay, peer);

It should be modified to

var fun = (function (p) { return function () { ab._connect(p); }
})(peer);
window.setTimeout(fun, peer.options.retryDelay);

The 3 parameter of setTimeout is not recognized by old web browsers.

Can anyone help :slight_smile: ?

You received this message because you are subscribed to the Google

Groups “Autobahn” group.

To unsubscribe from this group and stop receiving emails from it, send

an email to autobahnws+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

0 Likes