From 0777acdb1b6db0f10e7caa09ba8de1ba112b3fd3 Mon Sep 17 00:00:00 2001
From: a7458969 <290198252@qq.com>
Date: Sat, 18 Apr 2020 02:12:49 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0libevent?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/workspace.xml | 21 ++++-
CMakeLists.txt | 2 +-
.../CMakeFiles/General.dir/DependInfo.cmake | 1 +
.../CMakeFiles/General.dir/build.make | 20 ++++-
.../CMakeFiles/General.dir/cmake_clean.cmake | 1 +
.../CMakeFiles/General.dir/link.txt | 2 +-
.../CMakeFiles/General.dir/progress.make | 1 +
cmake-build-debug/CMakeFiles/Makefile2 | 4 +-
cmake-build-debug/CMakeFiles/clion-log.txt | 4 +-
cmake-build-debug/CMakeFiles/progress.marks | 2 +-
cmake-build-debug/General.cbp | 6 ++
cmake-build-debug/Makefile | 30 +++++++
obj/inc/signleton.h | 7 +-
obj/inc/utils.h | 1 +
src/net/TcpClient.cpp | 5 ++
src/net/TcpClient.h | 21 +++++
third/inc/libevent/evdns.h | 45 ++++++++++
third/inc/libevent/event.h | 83 +++++++++++++++++++
third/inc/libevent/evhttp.h | 45 ++++++++++
third/inc/libevent/evrpc.h | 45 ++++++++++
third/inc/libevent/evutil.h | 39 +++++++++
third/inc/libevent/include.am | 46 ++++++++++
22 files changed, 415 insertions(+), 16 deletions(-)
create mode 100644 src/net/TcpClient.cpp
create mode 100644 src/net/TcpClient.h
create mode 100644 third/inc/libevent/evdns.h
create mode 100644 third/inc/libevent/event.h
create mode 100644 third/inc/libevent/evhttp.h
create mode 100644 third/inc/libevent/evrpc.h
create mode 100644 third/inc/libevent/evutil.h
create mode 100644 third/inc/libevent/include.am
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5bfa897..d7f80c9 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -12,9 +12,22 @@
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -102,7 +115,9 @@
-
+
+
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 187b7d2..57eced7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,7 @@ aux_source_directory(src DIRSRCS)
aux_source_directory(src/pattern PaternSrc)
add_library(General ${DIRSRCS} ${PaternSrc} src/pattern/signleton.h src/pattern/Observer.h src/pattern/stratergy.h src/pattern/adapter.h src/encrypt/base64.cpp src/encrypt/base64.h src/encrypt/aes.cpp src/encrypt/aes.h src/encrypt/rsa.cpp
- src/math/BigInt.hpp)
+ src/math/BigInt.hpp src/net/TcpClient.cpp src/net/TcpClient.h)
set(COPYITEM inc)
file(GLOB INCLUDES ${PROJECT_SOURCE_DIR}/inc/*)
file(COPY ${INCLUDES} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc
diff --git a/cmake-build-debug/CMakeFiles/General.dir/DependInfo.cmake b/cmake-build-debug/CMakeFiles/General.dir/DependInfo.cmake
index 1c7676f..7b1ede6 100644
--- a/cmake-build-debug/CMakeFiles/General.dir/DependInfo.cmake
+++ b/cmake-build-debug/CMakeFiles/General.dir/DependInfo.cmake
@@ -9,6 +9,7 @@ set(CMAKE_DEPENDS_CHECK_CXX
"D:/project/c++/generallib/src/encrypt/base64.cpp" "D:/project/c++/generallib/cmake-build-debug/CMakeFiles/General.dir/src/encrypt/base64.cpp.obj"
"D:/project/c++/generallib/src/encrypt/rsa.cpp" "D:/project/c++/generallib/cmake-build-debug/CMakeFiles/General.dir/src/encrypt/rsa.cpp.obj"
"D:/project/c++/generallib/src/loger.cpp" "D:/project/c++/generallib/cmake-build-debug/CMakeFiles/General.dir/src/loger.cpp.obj"
+ "D:/project/c++/generallib/src/net/TcpClient.cpp" "D:/project/c++/generallib/cmake-build-debug/CMakeFiles/General.dir/src/net/TcpClient.cpp.obj"
"D:/project/c++/generallib/src/utils.cpp" "D:/project/c++/generallib/cmake-build-debug/CMakeFiles/General.dir/src/utils.cpp.obj"
)
set(CMAKE_CXX_COMPILER_ID "GNU")
diff --git a/cmake-build-debug/CMakeFiles/General.dir/build.make b/cmake-build-debug/CMakeFiles/General.dir/build.make
index ac2adde..0e33375 100644
--- a/cmake-build-debug/CMakeFiles/General.dir/build.make
+++ b/cmake-build-debug/CMakeFiles/General.dir/build.make
@@ -140,6 +140,20 @@ CMakeFiles/General.dir/src/encrypt/rsa.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/General.dir/src/encrypt/rsa.cpp.s"
C:\msys64\mingw64\bin\g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S D:\project\c++\generallib\src\encrypt\rsa.cpp -o CMakeFiles\General.dir\src\encrypt\rsa.cpp.s
+CMakeFiles/General.dir/src/net/TcpClient.cpp.obj: CMakeFiles/General.dir/flags.make
+CMakeFiles/General.dir/src/net/TcpClient.cpp.obj: CMakeFiles/General.dir/includes_CXX.rsp
+CMakeFiles/General.dir/src/net/TcpClient.cpp.obj: ../src/net/TcpClient.cpp
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:\project\c++\generallib\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building CXX object CMakeFiles/General.dir/src/net/TcpClient.cpp.obj"
+ C:\msys64\mingw64\bin\g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles\General.dir\src\net\TcpClient.cpp.obj -c D:\project\c++\generallib\src\net\TcpClient.cpp
+
+CMakeFiles/General.dir/src/net/TcpClient.cpp.i: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/General.dir/src/net/TcpClient.cpp.i"
+ C:\msys64\mingw64\bin\g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E D:\project\c++\generallib\src\net\TcpClient.cpp > CMakeFiles\General.dir\src\net\TcpClient.cpp.i
+
+CMakeFiles/General.dir/src/net/TcpClient.cpp.s: cmake_force
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/General.dir/src/net/TcpClient.cpp.s"
+ C:\msys64\mingw64\bin\g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S D:\project\c++\generallib\src\net\TcpClient.cpp -o CMakeFiles\General.dir\src\net\TcpClient.cpp.s
+
# Object files for target General
General_OBJECTS = \
"CMakeFiles/General.dir/src/debug.cpp.obj" \
@@ -147,7 +161,8 @@ General_OBJECTS = \
"CMakeFiles/General.dir/src/utils.cpp.obj" \
"CMakeFiles/General.dir/src/encrypt/base64.cpp.obj" \
"CMakeFiles/General.dir/src/encrypt/aes.cpp.obj" \
-"CMakeFiles/General.dir/src/encrypt/rsa.cpp.obj"
+"CMakeFiles/General.dir/src/encrypt/rsa.cpp.obj" \
+"CMakeFiles/General.dir/src/net/TcpClient.cpp.obj"
# External object files for target General
General_EXTERNAL_OBJECTS =
@@ -158,9 +173,10 @@ General_EXTERNAL_OBJECTS =
../obj/libGeneral.a: CMakeFiles/General.dir/src/encrypt/base64.cpp.obj
../obj/libGeneral.a: CMakeFiles/General.dir/src/encrypt/aes.cpp.obj
../obj/libGeneral.a: CMakeFiles/General.dir/src/encrypt/rsa.cpp.obj
+../obj/libGeneral.a: CMakeFiles/General.dir/src/net/TcpClient.cpp.obj
../obj/libGeneral.a: CMakeFiles/General.dir/build.make
../obj/libGeneral.a: CMakeFiles/General.dir/link.txt
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=D:\project\c++\generallib\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Linking CXX static library ..\obj\libGeneral.a"
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=D:\project\c++\generallib\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Linking CXX static library ..\obj\libGeneral.a"
$(CMAKE_COMMAND) -P CMakeFiles\General.dir\cmake_clean_target.cmake
cp -r D:/project/c++/generallib/src/math/Eigen D:/project/c++/generallib/obj/inc/
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles\General.dir\link.txt --verbose=$(VERBOSE)
diff --git a/cmake-build-debug/CMakeFiles/General.dir/cmake_clean.cmake b/cmake-build-debug/CMakeFiles/General.dir/cmake_clean.cmake
index 5fc26f8..af43f75 100644
--- a/cmake-build-debug/CMakeFiles/General.dir/cmake_clean.cmake
+++ b/cmake-build-debug/CMakeFiles/General.dir/cmake_clean.cmake
@@ -6,6 +6,7 @@ file(REMOVE_RECURSE
"CMakeFiles/General.dir/src/encrypt/base64.cpp.obj"
"CMakeFiles/General.dir/src/encrypt/rsa.cpp.obj"
"CMakeFiles/General.dir/src/loger.cpp.obj"
+ "CMakeFiles/General.dir/src/net/TcpClient.cpp.obj"
"CMakeFiles/General.dir/src/utils.cpp.obj"
)
diff --git a/cmake-build-debug/CMakeFiles/General.dir/link.txt b/cmake-build-debug/CMakeFiles/General.dir/link.txt
index 218a9e1..f6e085e 100644
--- a/cmake-build-debug/CMakeFiles/General.dir/link.txt
+++ b/cmake-build-debug/CMakeFiles/General.dir/link.txt
@@ -1,2 +1,2 @@
-C:\msys64\mingw64\bin\ar.exe qc ..\obj\libGeneral.a CMakeFiles/General.dir/src/debug.cpp.obj CMakeFiles/General.dir/src/loger.cpp.obj CMakeFiles/General.dir/src/utils.cpp.obj CMakeFiles/General.dir/src/encrypt/base64.cpp.obj CMakeFiles/General.dir/src/encrypt/aes.cpp.obj CMakeFiles/General.dir/src/encrypt/rsa.cpp.obj
+C:\msys64\mingw64\bin\ar.exe qc ..\obj\libGeneral.a CMakeFiles/General.dir/src/debug.cpp.obj CMakeFiles/General.dir/src/loger.cpp.obj CMakeFiles/General.dir/src/utils.cpp.obj CMakeFiles/General.dir/src/encrypt/base64.cpp.obj CMakeFiles/General.dir/src/encrypt/aes.cpp.obj CMakeFiles/General.dir/src/encrypt/rsa.cpp.obj CMakeFiles/General.dir/src/net/TcpClient.cpp.obj
C:\msys64\mingw64\bin\ranlib.exe ..\obj\libGeneral.a
diff --git a/cmake-build-debug/CMakeFiles/General.dir/progress.make b/cmake-build-debug/CMakeFiles/General.dir/progress.make
index 2f82315..5b29368 100644
--- a/cmake-build-debug/CMakeFiles/General.dir/progress.make
+++ b/cmake-build-debug/CMakeFiles/General.dir/progress.make
@@ -5,4 +5,5 @@ CMAKE_PROGRESS_4 = 4
CMAKE_PROGRESS_5 = 5
CMAKE_PROGRESS_6 = 6
CMAKE_PROGRESS_7 = 7
+CMAKE_PROGRESS_8 = 8
diff --git a/cmake-build-debug/CMakeFiles/Makefile2 b/cmake-build-debug/CMakeFiles/Makefile2
index e3905dc..f8fa729 100644
--- a/cmake-build-debug/CMakeFiles/Makefile2
+++ b/cmake-build-debug/CMakeFiles/Makefile2
@@ -73,12 +73,12 @@ preinstall:
CMakeFiles/General.dir/all:
$(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/depend
$(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/build
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:\project\c++\generallib\cmake-build-debug\CMakeFiles --progress-num=1,2,3,4,5,6,7 "Built target General"
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:\project\c++\generallib\cmake-build-debug\CMakeFiles --progress-num=1,2,3,4,5,6,7,8 "Built target General"
.PHONY : CMakeFiles/General.dir/all
# Build rule for subdir invocation for target.
CMakeFiles/General.dir/rule: cmake_check_build_system
- $(CMAKE_COMMAND) -E cmake_progress_start D:\project\c++\generallib\cmake-build-debug\CMakeFiles 7
+ $(CMAKE_COMMAND) -E cmake_progress_start D:\project\c++\generallib\cmake-build-debug\CMakeFiles 8
$(MAKE) -f CMakeFiles\Makefile2 CMakeFiles/General.dir/all
$(CMAKE_COMMAND) -E cmake_progress_start D:\project\c++\generallib\cmake-build-debug\CMakeFiles 0
.PHONY : CMakeFiles/General.dir/rule
diff --git a/cmake-build-debug/CMakeFiles/clion-log.txt b/cmake-build-debug/CMakeFiles/clion-log.txt
index 770b0fd..34ea48c 100644
--- a/cmake-build-debug/CMakeFiles/clion-log.txt
+++ b/cmake-build-debug/CMakeFiles/clion-log.txt
@@ -1,6 +1,6 @@
"C:\Program Files\JetBrains\CLion\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:/msys64/mingw64/bin/mingw32-make.exe -G "CodeBlocks - MinGW Makefiles" D:\project\c++\generallib
-statusD:/project/c++/generallib/inc/debug.hD:/project/c++/generallib/inc/loger.hD:/project/c++/generallib/inc/utils.h
-copy pattern libraryD:/project/c++/generallib/src/pattern/Observer.hD:/project/c++/generallib/src/pattern/adapter.hD:/project/c++/generallib/src/pattern/signleton.hD:/project/c++/generallib/src/pattern/stratergy.h
+statusD:/project/c++/generallib/inc/debug.hD:/project/c++/generallib/inc/gladD:/project/c++/generallib/inc/loger.hD:/project/c++/generallib/inc/utils.h
+copy pattern libraryD:/project/c++/generallib/src/pattern/Observer.hD:/project/c++/generallib/src/pattern/adapter.hD:/project/c++/generallib/src/pattern/fsm.hD:/project/c++/generallib/src/pattern/signleton.hD:/project/c++/generallib/src/pattern/stratergy.h
copy math libraryD:/project/c++/generallib/src/math/BigInt.hpp
copy eigen library
-- Configuring done
diff --git a/cmake-build-debug/CMakeFiles/progress.marks b/cmake-build-debug/CMakeFiles/progress.marks
index 7f8f011..45a4fb7 100644
--- a/cmake-build-debug/CMakeFiles/progress.marks
+++ b/cmake-build-debug/CMakeFiles/progress.marks
@@ -1 +1 @@
-7
+8
diff --git a/cmake-build-debug/General.cbp b/cmake-build-debug/General.cbp
index 1a1680b..45f2003 100644
--- a/cmake-build-debug/General.cbp
+++ b/cmake-build-debug/General.cbp
@@ -117,6 +117,12 @@
+
+
+
+
+
+
diff --git a/cmake-build-debug/Makefile b/cmake-build-debug/Makefile
index cd811e7..5f19bbf 100644
--- a/cmake-build-debug/Makefile
+++ b/cmake-build-debug/Makefile
@@ -257,6 +257,33 @@ src/loger.cpp.s:
$(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/loger.cpp.s
.PHONY : src/loger.cpp.s
+src/net/TcpClient.obj: src/net/TcpClient.cpp.obj
+
+.PHONY : src/net/TcpClient.obj
+
+# target to build an object file
+src/net/TcpClient.cpp.obj:
+ $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/net/TcpClient.cpp.obj
+.PHONY : src/net/TcpClient.cpp.obj
+
+src/net/TcpClient.i: src/net/TcpClient.cpp.i
+
+.PHONY : src/net/TcpClient.i
+
+# target to preprocess a source file
+src/net/TcpClient.cpp.i:
+ $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/net/TcpClient.cpp.i
+.PHONY : src/net/TcpClient.cpp.i
+
+src/net/TcpClient.s: src/net/TcpClient.cpp.s
+
+.PHONY : src/net/TcpClient.s
+
+# target to generate assembly for a file
+src/net/TcpClient.cpp.s:
+ $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/net/TcpClient.cpp.s
+.PHONY : src/net/TcpClient.cpp.s
+
src/utils.obj: src/utils.cpp.obj
.PHONY : src/utils.obj
@@ -308,6 +335,9 @@ help:
@echo ... src/loger.obj
@echo ... src/loger.i
@echo ... src/loger.s
+ @echo ... src/net/TcpClient.obj
+ @echo ... src/net/TcpClient.i
+ @echo ... src/net/TcpClient.s
@echo ... src/utils.obj
@echo ... src/utils.i
@echo ... src/utils.s
diff --git a/obj/inc/signleton.h b/obj/inc/signleton.h
index 9ad8ccf..c279246 100644
--- a/obj/inc/signleton.h
+++ b/obj/inc/signleton.h
@@ -19,14 +19,13 @@ public:
return mInstance.get();
}
private:
- Singletone(){};
- ~Singletone(){};
- Singletone &operator=(const Singletone&){};
+ Singletone(){}
+ ~Singletone(){}
+ Singletone &operator=(const Singletone&){}
static unique_ptr mInstance;
};
template
unique_ptr Singletone::mInstance;
-template
#define DECLARE_SINGLETON(type) \
friend class unique_ptr ; \
diff --git a/obj/inc/utils.h b/obj/inc/utils.h
index d1cc199..c02c7a9 100644
--- a/obj/inc/utils.h
+++ b/obj/inc/utils.h
@@ -21,4 +21,5 @@ using namespace std;
}
string itos(int x);
+
#endif //CUTILS_UTILS_H
diff --git a/src/net/TcpClient.cpp b/src/net/TcpClient.cpp
new file mode 100644
index 0000000..7ca07a2
--- /dev/null
+++ b/src/net/TcpClient.cpp
@@ -0,0 +1,5 @@
+//
+// Created by 29019 on 2020/4/18.
+//
+
+#include "TcpClient.h"
diff --git a/src/net/TcpClient.h b/src/net/TcpClient.h
new file mode 100644
index 0000000..87e62ac
--- /dev/null
+++ b/src/net/TcpClient.h
@@ -0,0 +1,21 @@
+//
+// Created by 29019 on 2020/4/18.
+//
+
+#ifndef GENERAL_TCPCLIENT_H
+#define GENERAL_TCPCLIENT_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+class TcpClient {
+
+};
+
+
+#endif //GENERAL_TCPCLIENT_H
diff --git a/third/inc/libevent/evdns.h b/third/inc/libevent/evdns.h
new file mode 100644
index 0000000..8672db0
--- /dev/null
+++ b/third/inc/libevent/evdns.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef EVENT1_EVDNS_H_INCLUDED_
+#define EVENT1_EVDNS_H_INCLUDED_
+
+/** @file evdns.h
+
+ A dns subsystem for Libevent.
+
+ The header is deprecated in Libevent 2.0 and later; please
+ use instead. Depending on what functionality you
+ need, you may also want to include more of the other
+ headers.
+ */
+
+#include
+#include
+#include
+#include
+
+#endif /* EVENT1_EVDNS_H_INCLUDED_ */
diff --git a/third/inc/libevent/event.h b/third/inc/libevent/event.h
new file mode 100644
index 0000000..ba51867
--- /dev/null
+++ b/third/inc/libevent/event.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef EVENT1_EVENT_H_INCLUDED_
+#define EVENT1_EVENT_H_INCLUDED_
+
+/** @file event.h
+
+ A library for writing event-driven network servers.
+
+ The header is deprecated in Libevent 2.0 and later; please
+ use instead. Depending on what functionality you
+ need, you may also want to include more of the other event2/
+ headers.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include
+#endif
+#ifdef EVENT__HAVE_STDINT_H
+#include
+#endif
+#include
+
+/* For int types. */
+#include
+
+#ifdef _WIN32
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include
+#include
+#undef WIN32_LEAN_AND_MEAN
+#endif
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT1_EVENT_H_INCLUDED_ */
diff --git a/third/inc/libevent/evhttp.h b/third/inc/libevent/evhttp.h
new file mode 100644
index 0000000..549bc9b
--- /dev/null
+++ b/third/inc/libevent/evhttp.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2000-2007 Niels Provos
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef EVENT1_EVHTTP_H_INCLUDED_
+#define EVENT1_EVHTTP_H_INCLUDED_
+
+/** @file evhttp.h
+
+ An http implementation subsystem for Libevent.
+
+ The header is deprecated in Libevent 2.0 and later; please
+ use instead. Depending on what functionality you
+ need, you may also want to include more of the other
+ headers.
+ */
+
+#include
+#include
+#include
+#include
+
+#endif /* EVENT1_EVHTTP_H_INCLUDED_ */
diff --git a/third/inc/libevent/evrpc.h b/third/inc/libevent/evrpc.h
new file mode 100644
index 0000000..7e986f7
--- /dev/null
+++ b/third/inc/libevent/evrpc.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef EVENT1_EVRPC_H_INCLUDED_
+#define EVENT1_EVRPC_H_INCLUDED_
+
+/** @file evrpc.h
+
+ An RPC system for Libevent.
+
+ The header is deprecated in Libevent 2.0 and later; please
+ use instead. Depending on what functionality you
+ need, you may also want to include more of the other
+ headers.
+ */
+
+#include
+#include
+#include
+#include
+
+#endif /* EVENT1_EVRPC_H_INCLUDED_ */
diff --git a/third/inc/libevent/evutil.h b/third/inc/libevent/evutil.h
new file mode 100644
index 0000000..12c137d
--- /dev/null
+++ b/third/inc/libevent/evutil.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef EVENT1_EVUTIL_H_INCLUDED_
+#define EVENT1_EVUTIL_H_INCLUDED_
+
+/** @file evutil.h
+
+ Utility and compatibility functions for Libevent.
+
+ The header is deprecated in Libevent 2.0 and later; please
+ use instead.
+*/
+
+#include
+
+#endif /* EVENT1_EVUTIL_H_INCLUDED_ */
diff --git a/third/inc/libevent/include.am b/third/inc/libevent/include.am
new file mode 100644
index 0000000..9aad2db
--- /dev/null
+++ b/third/inc/libevent/include.am
@@ -0,0 +1,46 @@
+# include/Makefile.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+include_event2dir = $(includedir)/event2
+
+EVENT2_EXPORT = \
+ include/event2/buffer.h \
+ include/event2/buffer_compat.h \
+ include/event2/bufferevent.h \
+ include/event2/bufferevent_compat.h \
+ include/event2/bufferevent_ssl.h \
+ include/event2/bufferevent_struct.h \
+ include/event2/dns.h \
+ include/event2/dns_compat.h \
+ include/event2/dns_struct.h \
+ include/event2/event.h \
+ include/event2/event_compat.h \
+ include/event2/event_struct.h \
+ include/event2/http.h \
+ include/event2/http_compat.h \
+ include/event2/http_struct.h \
+ include/event2/keyvalq_struct.h \
+ include/event2/listener.h \
+ include/event2/rpc.h \
+ include/event2/rpc_compat.h \
+ include/event2/rpc_struct.h \
+ include/event2/tag.h \
+ include/event2/tag_compat.h \
+ include/event2/thread.h \
+ include/event2/util.h \
+ include/event2/visibility.h
+
+## Without the nobase_ prefixing, Automake would strip "include/event2/" from
+## the source header filename to derive the installed header filename.
+## With nobase_ the installed path is $(includedir)/include/event2/ev*.h.
+
+if INSTALL_LIBEVENT
+include_event2_HEADERS = $(EVENT2_EXPORT)
+nodist_include_event2_HEADERS = include/event2/event-config.h
+else
+noinst_HEADERS += $(EVENT2_EXPORT)
+nodist_noinst_HEADERS = include/event2/event-config.h
+endif