in reply to Gtk2 app on Windows, driving a background process
You may find the technique described here http://www.nntp.perl.org/group/perl.tcltk/2011/03/msg524.html of interest. I use it to talk to various sockets and to vlc via http all the time