Re: sockets (long)
| From: | Yasuo Ohgaki | Date: | Thu, 05 Apr 2001 08:53:44 +0000 |
| Subject: | Re: sockets (long) | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47210@lists.php.net to get a copy of this message | ||
set_nonblock() is in PHP C source, but not in the PHP Manual. May be it's dead?
It seems it take one parameter (file descriptor), let us know if it works. I
might want to use it in the future :)
From socket.c
529 /* {{{ proto bool set_nonblock(int fd)
530 Sets nonblocking mode for file descriptor fd */
531 PHP_FUNCTION(set_nonblock)
532 {
533 zval **fd;
534 int ret;
535
536 if (ZEND_NUM_ARGS() != 1 ||
537 zend_get_parameters_ex(1, &fd) == FAILURE) {
538 WRONG_PARAM_COUNT;
539 }
540 convert_to_long_ex(fd);
541
542 ret = fcntl(Z_LVAL_PP(fd), F_SETFL, O_NONBLOCK);
543
544 RETURN_LONG(((ret < 0) ? -errno : ret));
545 }
546 /* }}} */
Hope this helps.
--
Yasuo Ohgaki
"Joseph Blythe" <joe.blythe@binarylogic.com.au> wrote in message
news:3ACC09F3.403@binarylogic.com.au...
> Plutarck wrote:
>
> > Very recently (a few days at most ago) someone was complaining about the
> > problem you are having.
> >
> > According to them they can't get the socket function to accept socket
> > nonblocking.
> >
> > It would seem that the function is broken, so you can't set nonblocking to a
> > valid value at the current time.
> >
> > Hopefully it will be fixed in 4.0.5, due out in a few days.
>
>
> It was probaly me as I posted a message about this a few days ago ;-)
>
> I really hope that it does get fixed in 4.0.5
>
> Oh well as they say !@#$ happens,
>
> Thanks,
>
> Joseph
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>