Exemplo n.º 1
0
 /**
  * send an EPP frame to the remote peer
  * @param resource $socket a socket connected to the remote peer
  * @param string $xml the XML to send
  * @throws Exception when it doesn't complete the write to the socket
  * @return the amount of bytes written to the frame
  */
 static function sendFrame($socket, $xml)
 {
     // Grab XML length & add on 4 bytes for the counter
     $length = strlen($xml) + 4;
     $res = Net_EPP_Protocol::_fwrite_nb($socket, pack('N', $length) . $xml, $length);
     // Check our write matches
     if ($length != $res) {
         throw new Exception("Short write when sending XML");
     }
     return $res;
 }
Exemplo n.º 2
0
 /**
  * Send an XML frame to the server.
  * This method sends an EPP frame to the server.
  * @param string the XML data to send
  * @throws Exception when it doesn't complete the write to the socket
  * @return boolean the result of the fwrite() operation
  */
 function sendFrame($xml)
 {
     return Net_EPP_Protocol::sendFrame($this->socket, $xml);
 }
Exemplo n.º 3
0
 /**
  * Send an XML frame to the server.
  * This method sends an EPP frame to the server.
  * @param string the XML data to send
  * @throws Exception when it doesn't complete the write to the socket
  * @return boolean the result of the fwrite() operation
  */
 function sendFrame($xml)
 {
     return Net_EPP_Protocol::sendFrame($this->socket, is_object($xml) ? $xml->saveXML() : $xml);
 }