mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-29 18:27:43 +08:00
modify the file annotations
This commit is contained in:
parent
c32c5bf44b
commit
de6e93da66
@ -1,3 +1,17 @@
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <drogon/DrObject.h>
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include "cmd.h"
|
||||
#include "CommandHandler.h"
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "create.h"
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include "create_controller.h"
|
||||
#include "cmd.h"
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,3 +1,17 @@
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include "create_view.h"
|
||||
#include "cmd.h"
|
||||
#include <iostream>
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include "help.h"
|
||||
#include <drogon/DrClassMap.h>
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,3 +1,17 @@
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
* this is a drogon lib tool program
|
||||
* run drogon_ctl help to get usage
|
||||
*/
|
||||
|
||||
#include "cmd.h"
|
||||
|
||||
|
@ -1,3 +1,17 @@
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include "version.h"
|
||||
#include <drogon/version.h>
|
||||
#include <iostream>
|
||||
|
@ -1,3 +1,17 @@
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <drogon/DrObject.h>
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@ -39,6 +47,13 @@ template <typename T1,typename T2>
|
||||
class CacheMap
|
||||
{
|
||||
public:
|
||||
/// constructor
|
||||
/// @param loop
|
||||
/// eventloop pointer
|
||||
/// @param interval
|
||||
/// timer step(seconds)
|
||||
/// @param limit
|
||||
/// tht max timeout value of the cache (seconds)
|
||||
CacheMap(trantor::EventLoop *loop,int interval,int limit)
|
||||
:timeInterval_(interval),
|
||||
_limit(limit),
|
||||
|
@ -1,8 +1,17 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <drogon/HttpFilter.h>
|
||||
|
@ -1,13 +1,18 @@
|
||||
//
|
||||
// DrClassMap.h
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
//
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DrClassMap_hpp
|
||||
#define DrClassMap_hpp
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
@ -34,4 +39,4 @@ protected:
|
||||
|
||||
};
|
||||
}
|
||||
#endif /* DrClassMap_hpp */
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
@ -1,8 +1,17 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <drogon/HttpFilter.h>
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,8 +1,17 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <drogon/DrObject.h>
|
||||
|
@ -1,7 +1,16 @@
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -8,13 +8,19 @@
|
||||
//
|
||||
// This is a public header file, it must only include public header files.
|
||||
|
||||
|
||||
//taken from muduo and modified
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
* taken from muduo and modified
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,3 +1,17 @@
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <drogon/DrObject.h>
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,8 +1,17 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <drogon/HttpFilter.h>
|
||||
|
@ -1,8 +1,17 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <drogon/HttpFilter.h>
|
||||
|
@ -1,8 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,8 +1,17 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include <drogon/DeleteFilter.h>
|
||||
#include "HttpResponseImpl.h"
|
||||
using namespace drogon;
|
||||
|
@ -1,10 +1,17 @@
|
||||
//
|
||||
// DrClassMap.cc
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
//
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <drogon/DrClassMap.h>
|
||||
#include <iostream>
|
||||
|
@ -1,8 +1,17 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include <drogon/GetFilter.h>
|
||||
#include "HttpResponseImpl.h"
|
||||
using namespace drogon;
|
||||
|
@ -1,7 +1,17 @@
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include "HttpRequestImpl.h"
|
||||
#include "HttpResponseImpl.h"
|
||||
#include <drogon/DrClassMap.h>
|
||||
@ -100,7 +110,21 @@ void HttpAppFrameworkImpl::run()
|
||||
serverPtr->start();
|
||||
servers.push_back(serverPtr);
|
||||
}
|
||||
_sessionMapPtr=std::unique_ptr<CacheMap<std::string,SessionPtr>>(new CacheMap<std::string,SessionPtr>(&loop,1,1200));
|
||||
int interval,limit;
|
||||
if(_sessionTimeout==0)
|
||||
{
|
||||
interval=1;
|
||||
limit=1200;
|
||||
}else if(_sessionTimeout<1000)
|
||||
{
|
||||
interval=1;
|
||||
limit=_sessionTimeout;
|
||||
} else
|
||||
{
|
||||
interval=_sessionTimeout/1000;
|
||||
limit=_sessionTimeout;
|
||||
}
|
||||
_sessionMapPtr=std::unique_ptr<CacheMap<std::string,SessionPtr>>(new CacheMap<std::string,SessionPtr>(&loop,interval,limit));
|
||||
loop.loop();
|
||||
}
|
||||
|
||||
|
@ -8,11 +8,20 @@
|
||||
//
|
||||
|
||||
//taken from muduo and modified
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <trantor/utils/MsgBuffer.h>
|
||||
|
@ -9,11 +9,20 @@
|
||||
// This is an internal header file, you should not include this.
|
||||
|
||||
//taken from muduo and modified
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MUDUO_NET_HTTP_HTTPCONTEXT_H
|
||||
#define MUDUO_NET_HTTP_HTTPCONTEXT_H
|
||||
|
@ -8,11 +8,20 @@
|
||||
//
|
||||
|
||||
//taken from muduo and modified
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include "HttpRequestImpl.h"
|
||||
//解url编码实现
|
||||
|
@ -9,11 +9,19 @@
|
||||
// This is a public header file, it must only include public header files.
|
||||
|
||||
//taken from muduo and modified
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -5,14 +5,20 @@
|
||||
// that can be found in the License file.
|
||||
|
||||
// Author: Shuo Chen (chenshuo at chenshuo dot com)
|
||||
//
|
||||
|
||||
//taken from muduo and modified
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include "HttpResponseImpl.h"
|
||||
|
||||
|
@ -10,11 +10,20 @@
|
||||
|
||||
|
||||
//taken from muduo and modified
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
@ -8,11 +8,19 @@
|
||||
//
|
||||
|
||||
//taken from muduo and modified
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include "HttpServer.h"
|
||||
|
||||
|
@ -1,4 +1,16 @@
|
||||
// Copyright 2018,antao. All rights reserved.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
@ -1,9 +1,16 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
#include <drogon/HttpViewBase.h>
|
||||
#include <drogon/DrClassMap.h>
|
||||
#include <trantor/utils/Logger.h>
|
||||
|
@ -1,8 +1,17 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include <drogon/PostFilter.h>
|
||||
#include "HttpResponseImpl.h"
|
||||
using namespace drogon;
|
||||
|
@ -1,8 +1,17 @@
|
||||
//
|
||||
// Copyright 2018, An Tao. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a MIT license
|
||||
// that can be found in the License file.
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* @author An Tao
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright 2018, An Tao. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license
|
||||
* that can be found in the License file.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*/
|
||||
|
||||
#include <drogon/PutFilter.h>
|
||||
#include "HttpResponseImpl.h"
|
||||
using namespace drogon;
|
||||
|
Loading…
Reference in New Issue
Block a user