123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- /**
- * Created by PhpStorm.
- * User: stanley-king
- * Date: 2017/12/14
- * Time: 下午2:28
- */
- require_once(BASE_ROOT_PATH . '/helper/event/IProcessor.php');
- require_once(BASE_ROOT_PATH . '/helper/event/event_looper.php');
- require_once(BASE_ROOT_PATH . '/helper/event/buffer_looper.php');
- require_once(BASE_ROOT_PATH . '/helper/event/util.php');
- class process_looper extends event\buffer_looper
- {
- private static $stInstance;
- public static function instance()
- {
- if(self::$stInstance == null) {
- self::$stInstance = new process_looper();
- }
- return self::$stInstance;
- }
- }
- class empty_processor implements event\IProcessor
- {
- public function __construct()
- {
- }
- public function onStart()
- {
- }
- public function onConnected($bufid,$stream,$host,$port,$args)
- {
- }
- public function onRequest($bufid, $body)
- {
- $input = json_decode($body,true);
- if($input == false) {
- return false;
- }
- }
- public function onClose($bufid)
- {
- }
- }
|