mBodyType = tcp_client::JsonType; } public static function instance() { if(self::$stInstance == null) { self::$stInstance = new factory_client(); } return self::$stInstance; } public function __destruct() { parent::__destruct(); } public function remote_addr() { global $config; $host = $config['room_srv']['host']; $port = $config['room_srv']['port']; return "tcp://{$host}:{$port}"; } }