On Mon, Jul 23, 2001 at 04:21:37PM -0400, Rocco Caputo wrote:
> On Mon, Jul 23, 2001 at 01:00:46PM -0600, Chris Fedde wrote:
> > It seems that the handle in ARG0 from the SuccessEvent of
> > POE::Wheel::SocketFactory is not an IO::Socket. I can't find any
> > way for the session that is handling that event to get arbitrary
> > arguments. Am I just missing something obvious?
> It's a plain filehandle, really. You can call builtin functions on it:
> If IO::Socket is just a wrapper for socket handles, you can bless them
> into that package. I don't know if this works.
> my $socket = bless $_[ARG0], 'IO::Socket';
>
> or
>
> my $socket = bless $_[ARG0], 'IO::Socket::INET';
I believe IO::Socket::INET->new_from_fd(fileno($_[ARG0]), "r+") or
IO::Socket->new_from_fd(fileno($_[ARG0])) will do a better job.
=Anton.
--
May the tuna salad be with you.