加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > PHP > 正文

[PHP]PHP rpc框架hprose测试

发布时间:2020-05-25 03:08:26 所属栏目:PHP 来源:互联网
导读:建立composer.json{name: hprose/examples,description: examples of hprose,authors: [{name: andot,email: mabingyao@gmail.com}],require: {php: =5.3.0,hprose/hprose: dev-master}}执行composer install建立server.php?phprequire_once ./vendor/autoloa

建立composer.json

"name": "hprose/examples","description": "examples of hprose","authors":"name": "andot","email": "mabingyao@gmail.com","require":"php": ">=5.3.0","hprose/hprose": "dev-master"

执行

composer install

建立server.php

setErrorTypes(->->addFunction('hello'->start();

建立client.php

fullDuplex = () (((yield ->hello("yield world1"((yield ->hello("yield world2"((yield ->hello("yield world3"((yield ->hello("yield world4"((yield ->hello("yield world5"((yield ->hello("yield world6" ( (

执行

php server..php

结果

(19) "Hello yield world1!" (19) "Hello yield world2!" (19) "Hello yield world3!" (19) "Hello yield world4!" (19) "Hello yield world5!" (19) "Hello yield world6!"

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读