mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 03:38:03 +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
|
#pragma once
|
||||||
|
|
||||||
#include <drogon/DrObject.h>
|
#include <drogon/DrObject.h>
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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 "cmd.h"
|
||||||
#include "CommandHandler.h"
|
#include "CommandHandler.h"
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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"
|
#include "create.h"
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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 "create_controller.h"
|
||||||
#include "cmd.h"
|
#include "cmd.h"
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#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 "create_view.h"
|
||||||
#include "cmd.h"
|
#include "cmd.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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 "help.h"
|
||||||
#include <drogon/DrClassMap.h>
|
#include <drogon/DrClassMap.h>
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#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"
|
#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 "version.h"
|
||||||
#include <drogon/version.h>
|
#include <drogon/version.h>
|
||||||
#include <iostream>
|
#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
|
#pragma once
|
||||||
|
|
||||||
#include <drogon/DrObject.h>
|
#include <drogon/DrObject.h>
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
@ -39,6 +47,13 @@ template <typename T1,typename T2>
|
|||||||
class CacheMap
|
class CacheMap
|
||||||
{
|
{
|
||||||
public:
|
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)
|
CacheMap(trantor::EventLoop *loop,int interval,int limit)
|
||||||
:timeInterval_(interval),
|
:timeInterval_(interval),
|
||||||
_limit(limit),
|
_limit(limit),
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
#include <drogon/HttpFilter.h>
|
#include <drogon/HttpFilter.h>
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
//
|
/**
|
||||||
// DrClassMap.h
|
*
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
* @file
|
||||||
//
|
* @author An Tao
|
||||||
// Use of this source code is governed by a MIT license
|
* @section LICENSE
|
||||||
// that can be found in the License file.
|
*
|
||||||
//
|
* 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
|
#pragma once
|
||||||
#define DrClassMap_hpp
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -34,4 +39,4 @@ protected:
|
|||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif /* DrClassMap_hpp */
|
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
#include <drogon/HttpFilter.h>
|
#include <drogon/HttpFilter.h>
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
#include <drogon/DrObject.h>
|
#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
|
* @file
|
||||||
// that can be found in the License 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
|
#pragma once
|
||||||
|
|
||||||
|
@ -8,13 +8,19 @@
|
|||||||
//
|
//
|
||||||
// This is a public header file, it must only include public header files.
|
// This is a public header file, it must only include public header files.
|
||||||
|
|
||||||
|
/**
|
||||||
//taken from muduo and modified
|
* taken from muduo and modified
|
||||||
//
|
* @file
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
* @author An Tao
|
||||||
//
|
* @section LICENSE
|
||||||
// Use of this source code is governed by a MIT license
|
*
|
||||||
// that can be found in the License file.
|
* 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.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#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
|
#pragma once
|
||||||
|
|
||||||
#include <drogon/DrObject.h>
|
#include <drogon/DrObject.h>
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
#include <drogon/HttpFilter.h>
|
#include <drogon/HttpFilter.h>
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
#include <drogon/HttpFilter.h>
|
#include <drogon/HttpFilter.h>
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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 <drogon/DeleteFilter.h>
|
||||||
#include "HttpResponseImpl.h"
|
#include "HttpResponseImpl.h"
|
||||||
using namespace drogon;
|
using namespace drogon;
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// DrClassMap.cc
|
*
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
* @file
|
||||||
//
|
* @author An Tao
|
||||||
// Use of this source code is governed by a MIT license
|
* @section LICENSE
|
||||||
// that can be found in the License file.
|
*
|
||||||
//
|
* 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 <drogon/DrClassMap.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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 <drogon/GetFilter.h>
|
||||||
#include "HttpResponseImpl.h"
|
#include "HttpResponseImpl.h"
|
||||||
using namespace drogon;
|
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
|
* @file
|
||||||
// that can be found in the License 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 "HttpRequestImpl.h"
|
||||||
#include "HttpResponseImpl.h"
|
#include "HttpResponseImpl.h"
|
||||||
#include <drogon/DrClassMap.h>
|
#include <drogon/DrClassMap.h>
|
||||||
@ -100,7 +110,21 @@ void HttpAppFrameworkImpl::run()
|
|||||||
serverPtr->start();
|
serverPtr->start();
|
||||||
servers.push_back(serverPtr);
|
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();
|
loop.loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,11 +8,20 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
//taken from muduo and modified
|
//taken from muduo and modified
|
||||||
//
|
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
/**
|
||||||
//
|
*
|
||||||
// Use of this source code is governed by a MIT license
|
* @file
|
||||||
// that can be found in the License 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>
|
#include <trantor/utils/MsgBuffer.h>
|
||||||
|
@ -9,11 +9,20 @@
|
|||||||
// This is an internal header file, you should not include this.
|
// This is an internal header file, you should not include this.
|
||||||
|
|
||||||
//taken from muduo and modified
|
//taken from muduo and modified
|
||||||
//
|
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
/**
|
||||||
//
|
*
|
||||||
// Use of this source code is governed by a MIT license
|
* @file
|
||||||
// that can be found in the License 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
|
#ifndef MUDUO_NET_HTTP_HTTPCONTEXT_H
|
||||||
#define MUDUO_NET_HTTP_HTTPCONTEXT_H
|
#define MUDUO_NET_HTTP_HTTPCONTEXT_H
|
||||||
|
@ -8,11 +8,20 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
//taken from muduo and modified
|
//taken from muduo and modified
|
||||||
//
|
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
/**
|
||||||
//
|
*
|
||||||
// Use of this source code is governed by a MIT license
|
* @file
|
||||||
// that can be found in the License 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 "HttpRequestImpl.h"
|
||||||
//解url编码实现
|
//解url编码实现
|
||||||
|
@ -9,11 +9,19 @@
|
|||||||
// This is a public header file, it must only include public header files.
|
// This is a public header file, it must only include public header files.
|
||||||
|
|
||||||
//taken from muduo and modified
|
//taken from muduo and modified
|
||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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
|
#pragma once
|
||||||
|
|
||||||
|
@ -5,14 +5,20 @@
|
|||||||
// that can be found in the License file.
|
// that can be found in the License file.
|
||||||
|
|
||||||
// Author: Shuo Chen (chenshuo at chenshuo dot com)
|
// Author: Shuo Chen (chenshuo at chenshuo dot com)
|
||||||
//
|
|
||||||
|
|
||||||
//taken from muduo and modified
|
/**
|
||||||
//
|
*
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
* @file
|
||||||
//
|
* @author An Tao
|
||||||
// Use of this source code is governed by a MIT license
|
* @section LICENSE
|
||||||
// that can be found in the License file.
|
*
|
||||||
|
* 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"
|
#include "HttpResponseImpl.h"
|
||||||
|
|
||||||
|
@ -10,11 +10,20 @@
|
|||||||
|
|
||||||
|
|
||||||
//taken from muduo and modified
|
//taken from muduo and modified
|
||||||
//
|
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
/**
|
||||||
//
|
*
|
||||||
// Use of this source code is governed by a MIT license
|
* @file
|
||||||
// that can be found in the License 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
|
//taken from muduo and modified
|
||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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"
|
#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
|
#pragma once
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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/HttpViewBase.h>
|
||||||
#include <drogon/DrClassMap.h>
|
#include <drogon/DrClassMap.h>
|
||||||
#include <trantor/utils/Logger.h>
|
#include <trantor/utils/Logger.h>
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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 <drogon/PostFilter.h>
|
||||||
#include "HttpResponseImpl.h"
|
#include "HttpResponseImpl.h"
|
||||||
using namespace drogon;
|
using namespace drogon;
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
//
|
/**
|
||||||
// Copyright 2018, An Tao. All rights reserved.
|
*
|
||||||
//
|
* @file
|
||||||
// Use of this source code is governed by a MIT license
|
* @author An Tao
|
||||||
// that can be found in the License file.
|
* @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 <drogon/PutFilter.h>
|
||||||
#include "HttpResponseImpl.h"
|
#include "HttpResponseImpl.h"
|
||||||
using namespace drogon;
|
using namespace drogon;
|
||||||
|
Loading…
Reference in New Issue
Block a user