-
Notifications
You must be signed in to change notification settings - Fork 4
asyncore
Woong Gyu La edited this page Jun 21, 2020
·
13 revisions
pyserver
is based on python asyncore module.
The python asyncore
controls all the asyncore
implementations by asyncore.loop()
.
(Please check python asyncore for more detail.)
The pyserver
contains AsyncoreController
implementation to automatically add/remove the new asyncore instance to asyncore.loop()
. So the user does NOT have to worry about controlling the asyncore.loop()
at all when TCP/UDP client/server is created.
However when terminating the application, it is important to call below functions before the termination in order to gracefully terminate all the asyncore module:
from pyserver.network import *
...
# When terminating the application
AsyncController.instance().stop()
AsyncController.instance().join()