This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
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
See https://github.com/gdyrrahitis/pcard In particular: - use typescript - use mocha, chai and nyc for integration and unit tests - modularize
- also includes two classes to log in the server: in the console (by default, for production for example), and in a local property (for tests)
- also allow to only pass 1 parameter to the loggers
It will give the possibility to add new funtionalities to: - send individual changes (ie. "that user has changed their color") - track other users interactions, ie. show the point moved by a specific user in Occupapp, setting the color of the point according to the user's color - possibly some direct exchanges between users
and send it to the new connected clients
Note that the state is not propagated to the other clients, after the state had been succesfully updated. In effect, the only purpose of the state is to give a new user its initial state. Its the duty of every client to send their changes directly to the other clients (that's the idea of websockets)
also: refactor to remove dead code
and also fix a log message when user is created
and improve test on logs
Should resolves the problem of "ghosts" users. In particular, see https://socket.io/docs/client-api/#new-Manager-url-options > timeout | 20000 | connection timeout before a connect_error and > | | connect_timeout events are emitted The client should be disconnected after the timeout, and the user should be removed from the list (not tested - don't know how to simulate this)
The state was not sent to the other clients.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.