We don't bite newbies here... much | |
PerlMonks |
Re^3: Server with GUIby zentara (Archbishop) |
on May 30, 2012 at 10:40 UTC ( [id://973254]=note: print w/replies, xml ) | Need Help?? |
I did not see the typed text from the client to the server. You may have a Window's related problem, where Tk's fileevent dosn't work reliably on some version of windows. See Client/Server sockets with TK on Win32 . There are workarounds, see Another Win32 Tk fileevent work around : using ioctl() properly for instance. If that dosn't work for you, it's possible to use a conventional select loop with sysread in a separate subroutine, and call it with a Tk timer every 10 milliseconds. See Tk fileevent with win32 sockets for a timer solution. It goes something like this untested code:
Also see Mastering Perl/Tk and the Window's fileevent problem If you are an eager seeker of Perl knowledge, I will tell you that another, more advanced GUI toolkit, called Gtk2 does have an IO watch ( like fileevent ) which does work on Windows, see Simple threaded chat server for a simple example to test with. Finally, you could just put Ubuntu Linux on your Desktop with a dual boot to Windows. :-) Finally, just to get you banging your head against the wall, I found an example of Wx using sockets, see Wx Socket. It probably works on Windows. I'm not really a human, but I play one on earth. Old Perl Programmer Haiku ................... flash japh
In Section
Seekers of Perl Wisdom
|
|