Changeset 216 for trunk/instant_messenger/inc/Jabber.abstract.php
- Timestamp:
- 03/11/08 14:53:31 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/instant_messenger/inc/Jabber.abstract.php
r164 r216 46 46 $this->_socket = $socket; 47 47 48 $return = fread($socket, 4096); 49 fwrite($socket, $pUser); 50 51 $return = fread($socket, 4096); 52 fwrite($socket, $pPassword); 53 54 $return = fread($socket, 4096); 55 fwrite($socket, $pConnectionType); 56 57 $return = fread($socket, 4096); 48 fwrite($socket, "{$USER}@{$SERVER}##{$pPassword}##{$pConnectionType}"); 49 50 #sleep(1); 51 52 $return = fread($socket, 3); 53 #var_dump($return); 54 #$return = "new"; 58 55 59 56 if ( $return == "new" ) … … 61 58 $xml = "<?xml version='1.0' encoding='UTF-8'?>"; 62 59 $xml .= "<stream:stream to='" . $SERVER . "' xmlns='jabber:client' "; 63 $xml .= "xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>";60 $xml .= "xmlns:stream='http://etherx.jabber.org/streams'>";// version='1.0'>"; 64 61 65 62 if ( $this->write($xml) === false ) … … 125 122 $xml = "</stream:stream>"; 126 123 127 if ( $this->write($xml) === false )128 throw new Exception('[disconnect] #1 Cannot write to socket (' . $this->_socket . '). File: ' . __FILE__ . ' :: ' . __LINE__);129 130 if ( ($xml = $this->read()) === false )131 throw new Exception('[disconnect] #2 it isn\'t possible read the socket. File: ' . __FILE__ . ' :: ' . __LINE__);124 #if ( $this->write($xml) === false ) 125 # throw new Exception('[disconnect] #1 Cannot write to socket (' . $this->_socket . '). File: ' . __FILE__ . ' :: ' . __LINE__); 126 127 #if ( ($xml = $this->read()) === false ) 128 # throw new Exception('[disconnect] #2 it isn\'t possible read the socket. File: ' . __FILE__ . ' :: ' . __LINE__); 132 129 } 133 130 catch(Exception $e)
Note: See TracChangeset
for help on using the changeset viewer.