Being a newbie in python and server programming, I am trying to wrap my head around the socketserver and it's threading mixin.
So far i have created a working server that handles ping-requests and can receive multiple files - one file per thread.
Thing is that I want the TCHandler to raise an event with the name of the received file, for further processing by another thread. I can, for the life of me, not wrap my head around how to implement an event in the TCPHandler.
My thought is that I need to insert the event into the TCPHandler when instantiating it, however it is not I that instantiates the handler class, but the ThreadedTCPServer class?
Anyone got any ideas? - Or am I just way, way, way off track here, and need to try a different approach all together?
I could of course just implement the further processing in the TCPHandler, however since i want to pre-process sime images before introducing them to a classifier, I'd rather have the preprocessing and classification running from a queue, and not in the TCPHandler thread.
Please advice