326 Star 1.6K Fork 345

GVPswoole / swoole-src

 / 详情

httpServer中如何使用after方法

Done
Opened this issue  
2017-12-21 16:12

我在官网的文档中看到:
http/websocket服务器都是继承自swoole_server,所以swoole_server提供的API,如task/finish/tick等都可以使用

但问题是,我该如何调用tick,after方法呢,request的回调函数中没有server这个参数,请问该如何处理?

Comments (2)

qizhijun created 任务

$http->on('request', function ($request, $response){
//这里怎么调用after的方法
});

qizhijun closed 任务
qizhijun reopened 任务

问题已经解决!

qizhijun closed 任务

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(1)
C
1
https://gitee.com/swoole/swoole.git
git@gitee.com:swoole/swoole.git
swoole
swoole
swoole-src

Search

53164aa7 5694891 3bd8fe86 5694891