Modify README

This commit is contained in:
antao 2019-02-02 10:12:57 +08:00
parent 82100926e5
commit 5b24e90f94
4 changed files with 6 additions and 8 deletions

View File

@ -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/) [![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) [![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: 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:

View File

@ -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/) [![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) [![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的误写为了不至于引起不必要的误会这里说明一下。 本版本库是github上[Drogon工程](https://github.com/an-tao/drogon)的镜像库。**Drogon**是作者非常喜欢的美剧《权力的游戏》中的一条龙的名字(汉译作卓耿)和龙有关但并不是dragon的误写为了不至于引起不必要的误会这里说明一下。
Drogon的主要应用平台是Linux也支持Mac OS、FreeBSD目前还不支持Windows。它的主要特点如下 Drogon的主要应用平台是Linux也支持Mac OS、FreeBSD目前还不支持Windows。它的主要特点如下

View File

@ -12,8 +12,7 @@
* *
*/ */
#ifndef __HEADER_DROGON_H__ #pragma once
#define __HEADER_DROGON_H__
#include <drogon/config.h> #include <drogon/config.h>
@ -27,6 +26,4 @@
#include <drogon/HttpSimpleController.h> #include <drogon/HttpSimpleController.h>
#include <drogon/CacheMap.h> #include <drogon/CacheMap.h>
#include <drogon/HttpClient.h> #include <drogon/HttpClient.h>
#include <drogon/utils/Utilities.h> #include <drogon/utils/Utilities.h>
#endif

View File

@ -318,7 +318,7 @@ void HttpAppFrameworkImpl::run()
ioLoops.push_back(serverPtr->getLoop()); ioLoops.push_back(serverPtr->getLoop());
} }
#else #else
auto loopThreadPtr = std::make_shared<EventLoopThread>("DrogonIoLoop"); auto loopThreadPtr = std::make_shared<EventLoopThread>("DrogonListeningLoop");
loopThreadPtr->run(); loopThreadPtr->run();
loopThreads.push_back(loopThreadPtr); loopThreads.push_back(loopThreadPtr);
auto serverPtr = std::make_shared<HttpServer>(loopThreadPtr->getLoop(), auto serverPtr = std::make_shared<HttpServer>(loopThreadPtr->getLoop(),
@ -349,6 +349,7 @@ void HttpAppFrameworkImpl::run()
serverPtr->setConnectionCallback(std::bind(&HttpAppFrameworkImpl::onConnection, this, _1)); serverPtr->setConnectionCallback(std::bind(&HttpAppFrameworkImpl::onConnection, this, _1));
serverPtr->kickoffIdleConnections(_idleConnectionTimeout); serverPtr->kickoffIdleConnections(_idleConnectionTimeout);
serverPtr->start(); serverPtr->start();
/// Use std::promise to ensure that IO loops have been created
std::promise<int> pro; std::promise<int> pro;
auto f = pro.get_future(); auto f = pro.get_future();
serverPtr->getLoop()->runInLoop([&pro]() { serverPtr->getLoop()->runInLoop([&pro]() {