You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
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.
The text was updated successfully, but these errors were encountered: