That is a big clue.
To bring the other monks up to date, I was privately contacted by email about this and proposed that the problem is in his client's socket sub, where he has socket code which will block the gui.
sub lee_socket { print "lee_socket\n"; my $conexion = $Socket_->accept(); my $mensaje; while( defined( my $buffer = <$Socket_> ) ) # read from the socket { print "From client: $buffer" ; $mensaje = $mensaje . $buffer ; } close($Socket_); }
I sent him fileevent code to replace this, but he hasn't responded as to whether it worked or not. The code was part of a simpler example, which wasn't obscured by the spaghetti complexity of the ini files, and long mexican variable names.
$mw ->fileevent($socket, readable => sub { my $line = <$socket>; unless (defined $line) { $mw->fileevent($socket => readable => ''); return; } $log->insert(end => $line); });
My advice, if you want to get people to answer this, is to present a simpler example. With all the complex ini files, and the need to create special files on my system, just to test your script, I will just think " hope someone knows this" and move on. Please try to remake your example code, to be a self contained server and client, which runs on localhost, and demonstrates your problem. Get rid of the ini crap and hardwire in the values, so all we have to do is start the server, and client and see what happens.
If you can't take the time to simplify(and clarify) your problem, why should we?
In reply to Re: perl/tk sockets and fileevent
by zentara
in thread perl/tk sockets and fileevent
by HeatSeekerCannibal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |