Source for file TCP.php
Documentation is available at TCP.php
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | 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. |
// +----------------------------------------------------------------------+
// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |
// +----------------------------------------------------------------------+
// $Id: TCP.php,v 1.1 2003/04/08 06:21:53 shane Exp $
require_once 'SOAP/Server.php';
* implements TCP SOAP Server
* http://www.pocketsoap.com/specs/smtpbinding/
* class overrides the default HTTP server, providing the ability
* to accept socket connections and execute soap calls.
* implement some security scheme
* implement support for attachments
* @version $Id: TCP.php,v 1.1 2003/04/08 06:21:53 shane Exp $
* @author Shane Caraveo <shane@php.net>
function SOAP_Server_TCP($localaddr= "127.0.0.1", $port=10000 , $listen=5 , $reuse=TRUE )
return $this->_raiseSoapFault ("socket_create() failed: reason: " . socket_strerror ($sock));
return $this->_raiseSoapFault ("socket_bind() failed: reason: " . socket_strerror ($ret));
# print "LISTENING on {$this->localaddr}:{$this->port}\n";
return $this->_raiseSoapFault ("socket_listen() failed: reason: " . socket_strerror ($ret));
$this->_raiseSoapFault ("socket_accept() failed: reason: " . socket_strerror ($msgsock));
# print "Accepted connection\n";
if (!$buf = trim($buf)) {
return $this->_raiseSoapFault ('Error sending response data reason '. socket_strerror());
# XXX we need to handle attachments somehow
Documentation generated on Mon, 11 Mar 2019 13:59:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|