problems with $kernel->delay and Gtk

2001-08-15 Thread Dan McCormick

Hi,

Has anyone had any problems using $kernel->delay and Gtk?  In my
application, setting a delay of one second takes 15 seconds to process. 
But if I take out the "use Gtk" statement, it works fine.  I can't seem
to reproduce the code in a small snippet, so until I whittle it down
further I thought I'd see if anyone else had run into this...

Thanks,
Dan



Problems using SocketFactorys on WinNT

2001-08-15 Thread Mark Fowler

As I explained on #poe I've been having problems using SocketFactorys on
NT boxes.  To cut to the chase, this is some code that doesn't work:

##

#!/usr/bin/perl

# This code doesn't work under Active State 628, latest version of
# the POE ppm from poe.souceforge.net, and NT4.  Works fine under Linux.

# gives the error "wheel 2 encountered connect error 10022: Unknown error"
# which is MS speak for "Invalid Argument" in the sockets library
# apparently

use POE qw(Wheel::SocketFactory Session);

new POE::Session
(
_start => \&start,
_stop  => \&stop,

connected => \&connected,
problem   => \&problem,
);
$poe_kernel->run();

sub start
{
   POE::Wheel::SocketFactory->new
  ( RemoteAddress => "2shortplanks.com",
RemotePort=> "80",
SuccessState  => 'connected',
FailureState  => 'problem',
  );
}

sub connected
{
  # do stuff
}

sub problem
{
  my ($heap, $operation, $errnum, $errstr, $wheel_id)
 = @_[HEAP, ARG0..ARG3];
  print "wheel $wheel_id encountered $operation error $errnum: $errstr\n";
}

sub stop {}

##

Now as the comments say this works fine on my Linux box, but not on the
NT boxes I've tried it on.   I've been assured however that this example
does run okay on Windows 2000Hmm.

I had a peek around the code in POE::Wheel::SocketFactory and found that
the problem was at line 723, when it does a:

   connect($socket_handle, $connect_address)

But I can't see what's wrong with this, or the code above.  I must admit
that I'm not very au fait with socket coding, and even less so on Windows
NT.

Any help, advice, pointers in the right direction or plain ridicule if
I've done something basically wrong sought after.

Thanks.

Mark.

-- 
s''  Mark Fowler London.pm   Bath.pm
 http://www.twoshortplanks.com/  [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}