Skip to content

Custom function for On Reconnect socket #97

@cschwaderer

Description

@cschwaderer

Using version 2.0.0-beta.3 of angular sails, I'd like to set up a custom function whenenever the connection/user socket is reconnected (e.g. after network problems).

But I don't know how to do that and whether it's possible at all.

Inside, angular-sails.js, I was able to run the lines of code below inside the SailsIo.prototype.connect function:

self.on('reconnect', function(attemps) {
console.log("Foooo");
});

But of course, that's not where such a function should be put. So, how can I put that into my own code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions