开源的PHP并行的RPC框架 Yar.zip

时间:2022-08-07 02:07:12
【文件属性】:
文件名称:开源的PHP并行的RPC框架 Yar.zip
文件大小:70KB
文件格式:ZIP
更新时间:2022-08-07 02:07:12
开源项目 Yar 是一个支持多种打包协议的, 并行的RPC框架.它基于HTTP协议, 在libcurl基础上开发而成简单的Server:class API {    /**     * the doc info will be generated automatically into service info page.     * @params     * @return     */    public function api($parameter, $option = "foo") {    }     protected function client_can_not_see() {    }} $service = new Yar_Server(new API());$service->handle();?>简单调用:$client = new Yar_Client("http://host/api/");$result = $client->api("parameter);?>并行调用:function callback($retval, $callinfo) {     var_dump($retval);} Yar_Concurrent_Client::call("http://host/api/", "api", array("parameters"), "callback");Yar_Concurrent_Client::call("http://host/api/", "api", array("parameters"), "callback");Yar_Concurrent_Client::call("http://host/api/", "api", array("parameters"), "callback");Yar_Concurrent_Client::call("http://host/api/", "api", array("parameters"), "callback");Yar_Concurrent_Client::loop(); //send?>更多信息参看: Yar at Github 标签:Yar
【文件预览】:
yar-master
----yar_response.c(4KB)
----.gitignore(118B)
----yar_protocol.h(2KB)
----README.md(5KB)
----travis()
--------compile.sh(41B)
----config.m4(2KB)
----yar_transport.c(4KB)
----yar_request.c(4KB)
----tests()
--------005.phpt(428B)
--------010.phpt(661B)
--------htdocs()
--------002.phpt(649B)
--------020.phpt(764B)
--------001.phpt(563B)
--------019.phpt(699B)
--------016.phpt(668B)
--------018.phpt(651B)
--------007.phpt(295B)
--------006.phpt(1KB)
--------017.phpt(870B)
--------013.phpt(1000B)
--------015.phpt(741B)
--------003.phpt(301B)
--------011.phpt(598B)
--------012.phpt(3KB)
--------004.phpt(790B)
--------yar.inc(2KB)
--------014.phpt(856B)
--------008.phpt(423B)
--------009.phpt(417B)
----yar_client.c(25KB)
----LICENSE(3KB)
----yar_server.c(19KB)
----yar.php(493B)
----yar_protocol.c(2KB)
----yar_exception.h(4KB)
----package.xml(10KB)
----config.w32(990B)
----yar_response.h(2KB)
----packagers()
--------php.c(2KB)
--------json.c(2KB)
--------msgpack.c(2KB)
----transports()
--------socket.c(10KB)
--------curl.c(24KB)
----yar.c(6KB)
----CREDITS(60B)
----php_yar.h(5KB)
----yar_packager.h(2KB)
----tools()
--------yar_debug.php(1KB)
--------yar_debug.inc(5KB)
----yar_transports.h(2KB)
----.travis.yml(251B)
----EXPERIMENTAL(0B)
----yar_transport.h(3KB)
----yar_client.h(2KB)
----yar_packager.c(5KB)
----yar_request.h(2KB)
----yar_server.h(1KB)
----yar_exception.c(6KB)

网友评论