Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: subscribe to socket events explicitly
This makes code easier to understand, because all listeners are added explicitly. Now it is clear what methods are called in response to which events and what parameters are passed to them. Also it is a preparation for migration to ES2015 classes, where original approach won't work, because methods in ES2015 classes are added as not enumerable properties, so it is harder to loop through them.
- Loading branch information
Showing
1 changed file
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters