I needed to write a test/monitoring program for an application that is
written in C++ which sends and receives messages on sockets. Normally I
would write such a test application in most likely C++, java because I
gui. I have been tying to learn ruby for some time, and it is very much
to write all other stuff except the gui part in ruby. I am trying to use
as well as gtk for learning purposes.
I am using ruby 1.8.15 (one click installation for windows) about the tk
library that comes with it. I have downloaded and installed
I have perl tk book, and trying to translate it to ruby and use the
that are explained there. I have noticed that very crucial notebook
is not available. I have also noticed that some of the other features
as binding external events and geometry managers except pack manager
are available in perl tk are not available in ruby binding. Even such a
small application, this makes tk almost unusable as gui toolkit. Besides
could not find a way to integrate an external event loop or process to
eventloop. There are some explanations about filevent and tk send
which iseemed not available in windows and in ruby.
I find gtk much more convenient especially with the use of glade ide and
libglade ruby binding. Even if know almost nothing about gtk, by using
interface designer and libglade binding, I was able to create quite
sophisticated well looking window with necessary events handled without
writing a line of ruby code. On the other hand, I have not been able to
figure out how to integrate a socket server to Gtk event loop.
To make to long story short, I need help about integration of a socket
server process/thread to Gtk and Tk event loop. How can I hook a
these event loops so that when a new data is available the callback is
I expect a high volume of network traffic so I need to decouple the gui
event loop and the server process.
Any help much appreciated and thanks in advance.