4. Code Patterns and Principles - littleredshack/socketbi GitHub Wiki
SOCKETBI is the function that contains all the other functions (login,logout, etc)
Library is an api so it must return values/functions that can be used in client callbacks. For example, after login/logout the client application needs to know that the login/logout was successful. So not sure we can just use an event approach. But maybe we can.
e.g. a logout function This will remove the session from the client browser session cache and from the server sessions list
//destroy session $("#logout").click(function () { SOCKETBI.logout().done(function () { alert("SOCKETBI session terminated." });