I have a script receiveing data from a socket, each data contains a sessionid that a have to keep track of, foreach incomming message, i'm opening a new process with the multiprocessing module, i having trouble to figure out a way to keep track of the new incoming messages having the same sessionid. For example:

100100|Hello -- 

(open a new process)

100100|Hello back at you

(proccess replies)

100101|Hello

(open a new process)

100101|Hello back at you

(new proccess replies)

100100|wasap? -- 

(open a new process)

when a new message from sessionid 100100 comes... how could i sent it to the process that is handling those particular messages?

until know the main process is opening a new process for each incomming message another process is writing data on the socket, but is giving me real trouble finding out a way to handle each session process and sending data to them...

I need some guidance cause a never work with multiprocessing before...

Thanks...