Modify helper class to support multiple clients
The class is renamed to "SessionHelper" and moved to "agkyra.protocol". It uses the session database to get information about the status of the protocol server. The session database is used to store the address and ui_id of the protocol server as well as a time stamp. The helper uses this information to resolve if the protocol server is active. If the server is active, the helper assumes there is a session running and allows the client to use the session credentials to connect to it. Otherwise, it generates new session credentials and offers the ability to start a protocol server. The GUI class is also modified to raise an assertion error if another GUI is already running. This is resolved by comparing the session information stored in the session file with the one provided by the helper. If they match, a GUI is running, otherwise a new GUI is launched.
Showing
- agkyra/agkyra/cli.py 2 additions, 10 deletionsagkyra/agkyra/cli.py
- agkyra/agkyra/gui.py 41 additions, 34 deletionsagkyra/agkyra/gui.py
- agkyra/agkyra/gui/COPYRIGHT 674 additions, 0 deletionsagkyra/agkyra/gui/COPYRIGHT
- agkyra/agkyra/gui/about.html 2 additions, 19 deletionsagkyra/agkyra/gui/about.html
- agkyra/agkyra/gui/menu.html 2 additions, 19 deletionsagkyra/agkyra/gui/menu.html
- agkyra/agkyra/gui/package.json 2 additions, 1 deletionagkyra/agkyra/gui/package.json
- agkyra/agkyra/gui/protocol.js 16 additions, 33 deletionsagkyra/agkyra/gui/protocol.js
- agkyra/agkyra/gui/settings.html 0 additions, 17 deletionsagkyra/agkyra/gui/settings.html
- agkyra/agkyra/gui/settings.js 0 additions, 17 deletionsagkyra/agkyra/gui/settings.js
- agkyra/agkyra/protocol.py 61 additions, 18 deletionsagkyra/agkyra/protocol.py
Loading
Please register or sign in to comment