deadpickle has asked for the wisdom of the Perl Monks concerning the following question:

I am starting a new project. I want to make a chat server and clients using the Gtk2 GUI interface but I'm not sure how to start it. Are there any modules that make this easy? If not, does anyone have any code snippets that could help? Also, I'm trying to grab GPS coordinates off of a USB GPS Device and am wondering how to do this?

Replies are listed 'Best First'.
Re: Gtk2 Chat server and Client
by zentara (Cardinal) on Dec 21, 2007 at 15:19 UTC
    See : shrek-donkey chat and it's Gtk2 tutorial

    Here is the only example of a client server I have, where the client uses Gtk2. I didn't write this, but it's very good and basic. As far as a chat server goes, programming Gtk2 is similar to Tk, except that instead of using a fileevent to watch the socket, you use a Gtk2::Helper ( read "perldoc Gtk2::Helper") Also, ask on the Perl/Gtk2 maillist where more Perl/Gtk2 programmers read daily.


    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
      I have been looking around and have found that POE maybe the way to go. Right now I am just interested in getting a chat server/client program started. I figure that if I can get that going I can then build Gtk2 around it. I have found a POE chat server taken from POE Cookbook but they dont have a client. I could probably figure out how they work if only I had an example of a client that was built using POE. Thats where I ask perlmonks for their knowledge.
        I might throw this tidbit in for you to consider: POE is an event loop system, as is Gtk2. So you are going to have to work out a way to let the 2 distinct event loops to work concurrently. Usually a timer run in your master loop, can do a 1-loop-update in the slave loop. Also, I havn't looked at POE lately, but it used to have a way to integrate Tk into it( look in the cookbook ), so you may be able to do the same with Gtk2( or ask a POE expert ).

        I'm not really a human, but I play one on earth. Cogito ergo sum a bum