Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PingListener #517

Merged
merged 2 commits into from
Feb 9, 2018
Merged

add PingListener #517

merged 2 commits into from
Feb 9, 2018

Conversation

lovebing
Copy link
Contributor

@lovebing lovebing commented Feb 8, 2018

PingListener for handling ping event. Sometimes it is important to know when clients send ping data to server. In distributed environments, to manage the information of online clients, we can put it into Redis when servers receive the ping data from clients, and set or update a expiry time for each client. In this way, managing the data of online clients becomes easy.

Copy link
Owner

@mrniko mrniko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

@@ -246,6 +242,11 @@ public void addConnectListener(ConnectListener listener) {
mainNamespace.addConnectListener(listener);
}

@Override
public void addPingListeners(PingListener pingListener) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lovebing Please rename method to addPingListener since you're adding only one listener at a time

@lovebing
Copy link
Contributor Author

lovebing commented Feb 8, 2018

@mrniko OK, it done.

@mrniko mrniko added this to the 1.7.14 milestone Feb 9, 2018
@mrniko mrniko merged commit 0d814da into mrniko:master Feb 9, 2018
@mrniko
Copy link
Owner

mrniko commented Feb 9, 2018

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants