summaryrefslogtreecommitdiff
path: root/swiftstory/SwiftStory.py
AgeCommit message (Collapse)Author
2020-11-01Add WrongAction exception and use it instaed of returning errorOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-11-01replace calls to print by calls to loggingOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-13Get rid of extra newlineOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-13Use callbacks to handle the opcodesOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-13Handle exception when JSON received is not an objectOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-12Handle JSON with no opcodeOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-12Fix missing module name in exception typeOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-28Rename function swiftory connection_handlerOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-28Don't use coroutines for functions sending notificationsOlivier Gayot
Functions which generate notifications for clients were all making use of await and async. This is not great because if we add a notification somewhere, we need to change the function to a coroutine and update all invocations (recursively changing all functions to coroutines). Instead, we now add a task to the event loop whenever a notification needs to be generated. This allows to drop the await and async specifiers from mostly everywhere. On the downside, it means that if we send a notification to n clients, we have to register n tasks. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-21Don't pass both the client and the socketOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-21Properly handle disconnections from remote endOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-15Add cosmetic changesOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-15Take the listen address and port as optional argumentsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-03-29Change the websocket library for the standard oneOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-03-29Catch right type of exception when decoding JSONOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2018-03-09use setuptools instead of only distutilsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>