From: D.V. <dav...@gm...> - 2011-09-02 08:41:55
|
Bonjour List ! I am writing a program that is supposed to listen to a tcp port, and when a client connects, update a UI done with wxHaskell. Since wxHaskell is not compatible with multiple threads, I am not sure how to do this. an idea I have is to - forkOS a thread which will do the network part. - when a message is sent from a client, write it to a channel - on the other thread, have a wxHaskell timer check periodically if a new message is available, update the UI if needed. I've tried it and it looks like it's working, but I anyone has some remark I'm interested. David. |