On Mon, 24 May 2004, Stas Bekman wrote:
> Date: Mon, 24 May 2004 10:18:22 -0700
> From: Stas Bekman <[EMAIL PROTECTED]>
> To: Jie Gao <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: [mp2] 1.99_14: socket problem
>
> Jie Gao wrote:
> > Hi All,
> >
> > This used to work:
> >
> > $socket->recv($line, 34);
> >
> > but the syntax has changed in 1.99_14, so I modified it to be:
> >
> > $line = $socket->recv(34);
> >
> > But I am getting this error:
> >
> > [error] APR::Socket::recv: Resource temporarily unavailable at ...pm line 117
> >
> > OBAny other obvious changes in APR::Socket that I missed here?
>
> The syntax has changes, yes. And you've adjusted it correctly. The problem
> might be coming from Apache I think. If you don't send complete reports it's
> hard to guess. Please *always* submit proper bug reports:
> See http://perl.apache.org/bugs/
>
> If you've moved to Apache 2.0.49, it now gives you a non-blocking socket. So
> all protocol handlers now must start with:
>
> use APR::Const -compile => 'SO_NONBLOCK';
> $sock->opt_set(APR::SO_NONBLOCK => 0);
Yes, I got your latest doco and put this line in yesterday and it worked!
BTW, shouldn't it be:
$sock->opt_set(APR::SO_NONBLOCK,0);
Thanks very much,
Regards,
Jie
> See:
> http://perl.apache.org/docs/2.0/user/handlers/protocols.html#Socket_based_Protocol_Module
>
> --
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
>
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html