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

About client lifecycle #8

Closed
wwhai opened this issue Oct 1, 2022 · 1 comment
Closed

About client lifecycle #8

wwhai opened this issue Oct 1, 2022 · 1 comment

Comments

@wwhai
Copy link
Contributor

wwhai commented Oct 1, 2022

Description

Should add an event interface which named OnConnected, Because that's only have OnConnect , But it seems only suit for todo something BEFORE connect,when we open Auth plugin,'OnConnected' maybe not trigger if auth failure。
image

Such bellow

type Events struct {
	OnProcessMessage // published message receieved before evaluation.
	OnMessage          // published message receieved.
	OnError                // server error.
	OnConnect           // client ready connect.
        OnConnected        // client connected.
	OnDisconnect       // client disconnected.
	OnSubscribe        // topic subscription created.
	OnUnsubscribe    // topic subscription removed.
}
@wind-c
Copy link
Owner

wind-c commented Oct 1, 2022

Authentication failure is also an error and can be detected by events#OnError.

@wind-c wind-c closed this as completed Oct 4, 2022
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

2 participants