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

Improve StaticSessionState #28

Open
Freyskeyd opened this issue Jul 11, 2021 · 0 comments
Open

Improve StaticSessionState #28

Freyskeyd opened this issue Jul 11, 2021 · 0 comments
Labels
To refine Ticket that need to be refine or improve

Comments

@Freyskeyd
Copy link
Owner

Freyskeyd commented Jul 11, 2021

SessionState is an Enum which represent the internal state of a session (both unauthenticated and authenticated). This state wasn't completely useful because of the lack of informations like the JID etc.

A Session hold its state but when receiving packet it must produce a Static snapshot of its state to share it alongside the packet. The StaticSessionState will be use to provide informations about the sender to the packet consumer. It must provide a way to:

  • Know which JID is providing the packet
  • Know how to respond asynchronously to the sender with a SessionCommand
  • Must provide a ResponseAddr to asynchronously reply with generated packets

As a Session when receiving a StaticSessionState it must choose wether or not it needs to update its internal state.

i.e.: When the binding packet is received, the session hold a jid which is a BareJid. The session manager will authorize (or not) the session to proceed. In case of a success we want the internal state of the Session to be a FullJid with the negotiated resource.

@Freyskeyd Freyskeyd added the To refine Ticket that need to be refine or improve label Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
To refine Ticket that need to be refine or improve
Projects
None yet
Development

No branches or pull requests

1 participant