From 5b24e90f94ff898fffd06693fdeb77214a0c57e4 Mon Sep 17 00:00:00 2001 From: antao Date: Sat, 2 Feb 2019 10:12:57 +0800 Subject: [PATCH] Modify README --- README.md | 2 +- README.zh-CN.md | 2 +- lib/inc/drogon/drogon.h | 7 ++----- lib/src/HttpAppFrameworkImpl.cc | 3 ++- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 91667959..c4cebbd8 100755 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Total alerts](https://img.shields.io/lgtm/alerts/g/an-tao/drogon.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/an-tao/drogon/alerts/) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/an-tao/drogon.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/an-tao/drogon/context:cpp) -**Drogon** is a C++11-based HTTP application framework. Drogon can be used to easily build various types of web application server programs using C++. **Drogon** is the name of a dragon in the American TV series "Game of Thrones" that I really like. +**Drogon** is a C++14/17-based HTTP application framework. Drogon can be used to easily build various types of web application server programs using C++. **Drogon** is the name of a dragon in the American TV series "Game of Thrones" that I really like. Drogon's main application platform is Linux. It also supports Mac OS and FreeBSD. Currently it does not support windows. Its main features are as follows: diff --git a/README.zh-CN.md b/README.zh-CN.md index e3c65834..22d2f8ab 100755 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -5,7 +5,7 @@ [![Total alerts](https://img.shields.io/lgtm/alerts/g/an-tao/drogon.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/an-tao/drogon/alerts/) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/an-tao/drogon.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/an-tao/drogon/context:cpp) -**Drogon**是一个基于C++11的Http应用框架,使用Drogon可以方便的使用C++构建各种类型的Web应用服务端程序。 +**Drogon**是一个基于C++14/17的Http应用框架,使用Drogon可以方便的使用C++构建各种类型的Web应用服务端程序。 本版本库是github上[Drogon工程](https://github.com/an-tao/drogon)的镜像库。**Drogon**是作者非常喜欢的美剧《权力的游戏》中的一条龙的名字(汉译作卓耿),和龙有关但并不是dragon的误写,为了不至于引起不必要的误会这里说明一下。 Drogon的主要应用平台是Linux,也支持Mac OS、FreeBSD,目前还不支持Windows。它的主要特点如下: diff --git a/lib/inc/drogon/drogon.h b/lib/inc/drogon/drogon.h index 43280a2d..fc55cc57 100644 --- a/lib/inc/drogon/drogon.h +++ b/lib/inc/drogon/drogon.h @@ -12,8 +12,7 @@ * */ -#ifndef __HEADER_DROGON_H__ -#define __HEADER_DROGON_H__ +#pragma once #include @@ -27,6 +26,4 @@ #include #include #include -#include - -#endif +#include \ No newline at end of file diff --git a/lib/src/HttpAppFrameworkImpl.cc b/lib/src/HttpAppFrameworkImpl.cc index a7c2b225..4aa00bae 100755 --- a/lib/src/HttpAppFrameworkImpl.cc +++ b/lib/src/HttpAppFrameworkImpl.cc @@ -318,7 +318,7 @@ void HttpAppFrameworkImpl::run() ioLoops.push_back(serverPtr->getLoop()); } #else - auto loopThreadPtr = std::make_shared("DrogonIoLoop"); + auto loopThreadPtr = std::make_shared("DrogonListeningLoop"); loopThreadPtr->run(); loopThreads.push_back(loopThreadPtr); auto serverPtr = std::make_shared(loopThreadPtr->getLoop(), @@ -349,6 +349,7 @@ void HttpAppFrameworkImpl::run() serverPtr->setConnectionCallback(std::bind(&HttpAppFrameworkImpl::onConnection, this, _1)); serverPtr->kickoffIdleConnections(_idleConnectionTimeout); serverPtr->start(); + /// Use std::promise to ensure that IO loops have been created std::promise pro; auto f = pro.get_future(); serverPtr->getLoop()->runInLoop([&pro]() {