资 源 简 介
Important
There is also GIT hosted version of this library, see MultiRPC on GitHub.
Usage example
Server
```
class A {
public $a1;
public $a2;
public function __construct($a1 = null, $a2 = null) {
$this->a1 = $a1;
$this->a2 = $a2;
}
public function setA1($a1) {
$this->a1 = $a1;
}
public function sum($a1, $a2) {
return $a1 + $a2;
}
public static function concat($a1, $a2) {
return $a1 . $a2;
}
public function getObject() {
return $this;
}
public static function getInstance() {
return new A();
}
public function getNull() {
return null;
}
}
$server = new RPCServer(new RPCProtocol(RPCSECUREKEY));
$server->runRpc();
$server->response["some"] = array("custom" => "response var");
$server->sendResponse();
```
Client
```
/****************************************