comparison sendstream.php @ 60:01079b81f125

modified: sendstream.php
author yoneda <yoneda@recorder.localnet.mda.or.jp>
date Sat, 01 Aug 2009 20:45:29 +0900
parents f40b6cc4c587
children
comparison
equal deleted inserted replaced
59:f40b6cc4c587 60:01079b81f125
36 $fp = @fopen( INSTALL_PATH.$settings->spool."/".$rrec->path, "r" ); 36 $fp = @fopen( INSTALL_PATH.$settings->spool."/".$rrec->path, "r" );
37 if( $fp !== false ) { 37 if( $fp !== false ) {
38 do { 38 do {
39 $start = microtime(true); 39 $start = microtime(true);
40 if( feof( $fp ) ) break; 40 if( feof( $fp ) ) break;
41
42 echo fread( $fp, 6292 ); 41 echo fread( $fp, 6292 );
43 42 @usleep( 2000 - (int)((microtime(true) - $start) * 1000 * 1000));
44 usleep( 2000 - (int)((microtime(true) - $start) * 1000) );
45 } 43 }
46 while( ! connection_aborted() ); 44 while( connection_aborted() == 0 );
47 } 45 }
48 fclose($fp); 46 fclose($fp);
49 } 47 }
50 catch(exception $e ) { 48 catch(exception $e ) {
51 exit( $e->getMessage() ); 49 exit( $e->getMessage() );