Skip to content

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

@Wafje

Description

@Wafje

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions