event.php 1003 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // 事件定义文件
  3. return [
  4. 'bind' => [
  5. ],
  6. 'listen' => [
  7. 'AppInit' => [],
  8. 'HttpRun' => [],
  9. 'HttpEnd' => [],
  10. 'LogLevel' => [],
  11. 'LogWrite' => [],
  12. // 通知
  13. 'Notice' => ['app\common\listener\NoticeListener'],
  14. // swoole 相关事件
  15. 'swoole.start' => ['app\common\listener\websocket\Start'], // 开启
  16. 'swoole.websocket.login' => ['app\common\listener\websocket\Login'], // 登录事件
  17. 'swoole.websocket.chat' => ['app\common\listener\websocket\Chat'], // 对话事件
  18. 'swoole.websocket.transfer' => ['app\common\listener\websocket\Transfer'], // 转接事件
  19. 'swoole.websocket.close' => ['app\common\listener\websocket\Close'], // 关闭事件
  20. 'swoole.websocket.user_online' => ['app\common\listener\websocket\UserOnline'], // 上线事件
  21. 'swoole.websocket.read' => ['app\common\listener\websocket\Read'], // 已读事件
  22. ],
  23. 'subscribe' => [
  24. ],
  25. ];