opcua
opcua copied to clipboard
Does the Client/Connection send out 'events' or notify in case the status of the connection changes?
Does the Client/Connection send out 'events' in case the status of the connection changes?
The client keep track of the connection state:
const (
// Closed, the Connection is currently closed
Closed [ConnState](https://pkg.go.dev/github.com/gopcua/opcua#ConnState) = [iota](https://pkg.go.dev/builtin#iota)
// Connected, the Connection is currently connected
Connected
// Connecting, the Connection is currently connecting to a server for the first time
Connecting
// Disconnected, the Connection is currently disconnected
Disconnected
// Reconnecting, the Connection is currently attempting to reconnect to a server it was previously connected to
Reconnecting
)
Is there a way to get notified when the value changes?