Source for file TCP.php
Documentation is available at TCP.php
* This file contains the code for a TCP transport layer.
* LICENSE: This source file is subject to version 2.02 of the PHP license,
* that is bundled with this package in the file LICENSE, and is available at
* through the world-wide-web at http://www.php.net/license/2_02.txt. If you
* did not receive a copy of the PHP license and are unable to obtain it
* through the world-wide-web, please send a note to license@php.net so we can
* mail you a copy immediately.
* @author Shane Hanna <iordy_at_iordy_dot_com>
* @author Jan Schneider <jan@horde.org>
* @copyright 2003-2006 The PHP Group
* @license http://www.php.net/license/2_02.txt PHP License 2.02
* @link http://pear.php.net/package/SOAP
require_once 'SOAP/Transport.php';
* TCP transport for SOAP.
* @todo use Net_Socket; implement some security scheme; implement support
* @author Shane Hanna <iordy_at_iordy_dot_com>
* @author Jan Schneider <jan@horde.org>
* @param string $url HTTP url to SOAP endpoint.
parent ::SOAP_Base_Object ('TCP');
// XXX how do we restart after socket_shutdown?
// Create socket resource.
* Sends and receives SOAP data.
* @param string Outgoing SOAP data.
* @return string|SOAP_Fault
function send($msg, $options = array ())
if (!$this->_validateUrl ()) {
if (!$this->_socket_ping ()) {
return $this->_raiseSoapFault ('Cannot change socket mode to read.');
// Read everything we can.
// Return payload or die.
return $this->_raiseSoapFault ('Error reveiving data from ' . $this->url);
return $this->_raiseSoapFault ('Invalid url scheme ' . $this->url);
* Validates the url data passed to the constructor.
$this->_raiseSoapFault (" Unable to parse URL $this->url");
$this->_raiseSoapFault (" No host in URL $this->url");
Documentation generated on Mon, 04 Aug 2008 20:00:32 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.
|