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

Does the Client/Connection send out 'events' or notify in case the status of the connection changes? #741

Open
Wafje opened this issue Aug 30, 2024 · 0 comments

Comments

@Wafje
Copy link

Wafje commented Aug 30, 2024

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?

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