Show
Ignore:
Timestamp:
02/15/2008 09:16:09 AM (11 months ago)
Author:
Shadowhand
Message:

Tweaking read handling just a little bit.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/kobot/libraries/Kobot.php

    r2056 r2057  
    239239                        $loop_time = microtime(TRUE); 
    240240 
    241                         // Read the raw server stream, up to 512 characters 
    242                         while ($raw = fgets($this->socket, 512)) 
     241                        // Read the raw server stream, up to 1024 characters 
     242                        while ($raw = fgets($this->socket, 1024)) 
    243243                        { 
    244244                                // Update the last received time 
     
    267267 
    268268                        // Every loop should take one-half second 
    269                         ($loop_time < 500000) and usleep(500000 - $loop_time); 
     269                        ($loop_time < 500000) and usleep(500000 - (int) $loop_time); 
    270270                } 
    271271 
    272272                // Disconnect 
    273273                $this->log(1, 'Disconnected'); 
     274 
     275                // TODO: Handle reconnecting 
    274276        } 
    275277