mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
update Hello example Module
This commit is contained in:
parent
6f32d117d0
commit
efce1767e6
@ -5,11 +5,9 @@ namespace Module\Example;
|
||||
|
||||
|
||||
use Framework\Console;
|
||||
use Framework\ZMBuf;
|
||||
use ZM\Annotation\CQ\CQCommand;
|
||||
use ZM\Annotation\Http\Controller;
|
||||
use ZM\Annotation\Http\RequestMapping;
|
||||
use ZM\Annotation\Module\Closed;
|
||||
use ZM\Annotation\Swoole\SwooleEventAt;
|
||||
use ZM\Connection\CQConnection;
|
||||
use ZM\ModBase;
|
||||
@ -48,4 +46,12 @@ class Hello extends ModBase
|
||||
public function pong(){
|
||||
$this->response->end("ping");
|
||||
}
|
||||
|
||||
/**
|
||||
* @SwooleEventAt(type="open",rule="connectType:unknown")
|
||||
*/
|
||||
public function closeUnknownConn(){
|
||||
Console::info("Unknown connection , I will close it.");
|
||||
$this->connection->close();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user