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

Abfrage ob Client inaktiv #22

Closed
dklinger opened this issue Jul 25, 2019 · 1 comment
Closed

Abfrage ob Client inaktiv #22

dklinger opened this issue Jul 25, 2019 · 1 comment

Comments

@dklinger
Copy link

Hi Jens,
kannst du mir sagen wie ich am ehesten raus finde, ob ein Client inaktiv (also disconnected) ist?
Ich habe mich schon durch die Objekte gesucht, werde aber nicht so richtig schlau draus.
Ich denke, dass last_seen ist hierzu gedacht, richtig?
Wenn ich das richtig interpretiere, nehme ich https://www.w3schools.com/jsref/jsref_gettime.asp / 1000 und prüfe dann die Differenz zwischen dem Ergebnis und dem Wert in last_seen. Wenn dieser bspw. 300 ist, wurde der Client seit 5 Minuten nicht mehr gesehen und ich kann ggf. davon ausgehen, dass er disconnected ist.
Bitte korrigier mich falls ich das falsch verstehe oder es einfach geht.

Beste Grüße,
Daniel

@dklinger
Copy link
Author

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

No branches or pull requests

1 participant