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

Implement connection monitoring #24

Open
gbakeman opened this issue Sep 20, 2021 · 0 comments
Open

Implement connection monitoring #24

gbakeman opened this issue Sep 20, 2021 · 0 comments
Assignees

Comments

@gbakeman
Copy link
Collaborator

gbakeman commented Sep 20, 2021

It would be useful to monitor the connection to the NUT server, and provide notifications if there's an issue.

In WinNUT, connection is monitored by sending an empty string to the server and looking for any response. If there is none, then the connection is considered broken and events are raised (see Nut_Socket.vb and UPS_Device.vb).

NUTClient raises:

  • Connecting
  • Connection Established
  • Connection Failed
  • (other events from Tcp class)

When moving to a MVVM type architecture, raising events may not be as helpful (since functions still need to return something) and instead make a caller deal with the issue up front by raising the exception. Or do both depending on the circumstance.

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