12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?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/EventLooper.php');
- require_once(BASE_ROOT_PATH . '/helper/event/util.php');
- class process_looper extends event\EventLooper
- {
- 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)
- {
- }
- }
|