Changeset 216 for trunk/instant_messenger/inc/class.Ujabber.inc.php
- Timestamp:
- 03/11/08 14:53:31 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/instant_messenger/inc/class.Ujabber.inc.php
r164 r216 26 26 { 27 27 $this->closeSocket(); 28 ob_end_flush(); 29 flush(); 30 } 31 32 public final function isConnected() 33 { 34 return $this->connected; 28 35 } 29 36 30 37 public final function listen() 31 38 { 32 if ( !$this-> connected)39 if ( !$this->isConnected() ) 33 40 return "disconnected"; 34 41 … … 47 54 $init = time(); 48 55 49 while ( !connection_aborted() && time() - $init < 30 )56 while ( !connection_aborted() && time() - $init < 50 ) 50 57 { 51 58 # read from server and write in the client 52 59 $xml = $this->readSocket(); 60 //var_dump($xml); 53 61 $xml = ( strlen($xml) ) ? $xml : ' '; 54 62 printf("%s", $xml); … … 57 65 usleep(6000); 58 66 } 59 ob_end_flush();60 67 } 61 68 } … … 63 70 public final function SendMessage($pSendMessage) 64 71 { 72 if ( !$this->isConnected() ) 73 return "disconnected"; 74 65 75 $pSendMessage['body'] = stripslashes($pSendMessage['body']); 66 76
Note: See TracChangeset
for help on using the changeset viewer.