are you using ownet or owphp?
on ownet settimeout just change sock_*, stream_*, fread, fwrite, f*
functions timeout, nothing on owserver is changed, and to know how many time
should php wait for owserver (on while(1){} loops)


check source code:

$this->link    =...@stream_socket_client(
                ($this->sock_type==OWNET_LINK_TYPE_TCP?'tcp://':'udp://').
                $this->host.":".$this->port, $errno, $errstr,
$this->timeout);
///////
stream_set_timeout($this->link        ,20);            // set timeout
///////
        $t1=intval($this->timeout);
        $t2=($this->timeout*1000000)%1000000;
            if ($this->link_type==OWNET_LINK_TYPE_SOCKET)
                $num_changed_sockets = socket_select($read, $write = NULL,
$except = NULL, $t1,$t2);    // use socket_select
            else
                $num_changed_sockets = stream_select($read, $write = NULL,
$except = NULL, $t1,$t2);    // use stream_select
////////
            if (microtime(1)-$last_read>$this->timeout)
                break;
////////
                if(strlen($data)>=24 ||
(microtime(1)-$start)>$this->timeout)
                    break;
/////////



2009/2/5 Mark Cheeseman <[email protected]>

> Hi all,
>
> I'm having trouble setting read timeouts in owphp. Whether I use
> ow->setTimeout($timeout=x) or set $timeout in the OWNet invocation, I
> get the correct value back from ow->getTimeout(), but it doesn't make
> any noticeable difference when reading from a couple of slow devices I'm
> trying to log. The first read fails; the second works fine, as it's
> reading from cache.
>
> What am I doing wrong? I get the feeling that the timeout I'm setting is
> the wrong one...
>
> I can access those devices without fail through owhttpd or using owread,
> but owphp only works if the value I'm trying to read is cached.
>
> Any ideas where I'm going wrong?
>
> -Mark
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Atualizado em 04/02/2009
>
>


-- 
Roberto Spadim
Spadim Technology
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to