diff --git a/ChangeLog b/ChangeLog
index fa0f16713c316ea45ca99fe3f89d31c71544ac05..7372068ed736e132083459d78b178f821b8e56c7 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,2 +1,2 @@
-2023-01-28 ahttp 1.3
- 1. 集成asynsdk: 1.3.2-20230128, https://github.com/netsecsp/asynframe
+2023-01-30 ahttp 集成asynframe-sdk_v1.3.2-20230130 https://github.com/netsecsp/asynframe
+
diff --git a/README.md b/README.md
index 3460b49a8bcbfd1fbf51636a380b97d113f7c660..a6cadc3205ea709bea9dcf035777b748bf75e653 100755
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-> asynframe-sdk_v1.3.2-20230128.zip is from https://github.com/netsecsp/asynframe
+> asynframe-sdk_v1.3.2-20230130.zip is from https://github.com/netsecsp/asynframe
# ahttpclient.exe
> supports IPv4/IPv6 http/https client program under windows
diff --git a/client/3rd/bin/asyncore.dll b/client/3rd/bin/asyncore.dll
new file mode 100755
index 0000000000000000000000000000000000000000..daaebb2008219e7f71615923f8eeb80dd77785bf
Binary files /dev/null and b/client/3rd/bin/asyncore.dll differ
diff --git a/client/3rd/bin/asynfile.dll b/client/3rd/bin/asynfile.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1f0c9213a704430df37f7bf6d153041c20c2030b
Binary files /dev/null and b/client/3rd/bin/asynfile.dll differ
diff --git a/client/3rd/bin/asynipcs.dll b/client/3rd/bin/asynipcs.dll
new file mode 100755
index 0000000000000000000000000000000000000000..3d2a54447074a6188a8ffd3e75417398bf4eb87a
Binary files /dev/null and b/client/3rd/bin/asynipcs.dll differ
diff --git a/client/3rd/bin/asynneta.dll b/client/3rd/bin/asynneta.dll
new file mode 100755
index 0000000000000000000000000000000000000000..ba73c726d4ab48a7684f7a7dcd39525cdc615e10
Binary files /dev/null and b/client/3rd/bin/asynneta.dll differ
diff --git a/client/3rd/bin/asynsock.dll b/client/3rd/bin/asynsock.dll
new file mode 100755
index 0000000000000000000000000000000000000000..072eae1c1acd592a0b5d740d48bb048fc6c6935b
Binary files /dev/null and b/client/3rd/bin/asynsock.dll differ
diff --git a/client/3rd/bin/console.dll b/client/3rd/bin/console.dll
new file mode 100755
index 0000000000000000000000000000000000000000..f7a291a11a8394a72415a403aa707e87d6a1c1f8
Binary files /dev/null and b/client/3rd/bin/console.dll differ
diff --git a/client/3rd/bin/crashexplorer.dll b/client/3rd/bin/crashexplorer.dll
new file mode 100755
index 0000000000000000000000000000000000000000..d5f318a5e875fa87f14d0ffee26e9c54f5a72648
Binary files /dev/null and b/client/3rd/bin/crashexplorer.dll differ
diff --git a/client/3rd/bin/dbghelp.dll b/client/3rd/bin/dbghelp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..6b0f88a6c282a878e9f1389e8ecb492a2869f2e6
Binary files /dev/null and b/client/3rd/bin/dbghelp.dll differ
diff --git a/client/3rd/bin/dns.dll b/client/3rd/bin/dns.dll
new file mode 100755
index 0000000000000000000000000000000000000000..d45ff654db938b13e1ba6a6d5db6f01edea50d9b
Binary files /dev/null and b/client/3rd/bin/dns.dll differ
diff --git a/client/3rd/bin/dtp.dll b/client/3rd/bin/dtp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..0d98b1bdb92c4e4b703df1f6e86fdcc6b6faadbd
Binary files /dev/null and b/client/3rd/bin/dtp.dll differ
diff --git a/client/3rd/bin/ftp.dll b/client/3rd/bin/ftp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..981c324e822d62ddec217ed50c3ce70715391bad
Binary files /dev/null and b/client/3rd/bin/ftp.dll differ
diff --git a/client/3rd/bin/http.dll b/client/3rd/bin/http.dll
new file mode 100755
index 0000000000000000000000000000000000000000..ebb924a86ba5e30d19eb10198bfcca9c240ad507
Binary files /dev/null and b/client/3rd/bin/http.dll differ
diff --git a/client/3rd/bin/jpeg.dll b/client/3rd/bin/jpeg.dll
new file mode 100755
index 0000000000000000000000000000000000000000..611b49d34e77e6edd6f4ce4f4eb669da728aaba0
Binary files /dev/null and b/client/3rd/bin/jpeg.dll differ
diff --git a/client/3rd/bin/log4cplus.dll b/client/3rd/bin/log4cplus.dll
new file mode 100755
index 0000000000000000000000000000000000000000..86bf1cb47282f0701ffb14f05d64e293eddd2082
Binary files /dev/null and b/client/3rd/bin/log4cplus.dll differ
diff --git a/client/3rd/bin/lua.dll b/client/3rd/bin/lua.dll
new file mode 100755
index 0000000000000000000000000000000000000000..944a5585edf027b8ba0b7bcf57eaaf8b72828c89
Binary files /dev/null and b/client/3rd/bin/lua.dll differ
diff --git a/client/3rd/bin/png.dll b/client/3rd/bin/png.dll
new file mode 100755
index 0000000000000000000000000000000000000000..3e7c869d65de2bb364ec973d86abf543e475cfe6
Binary files /dev/null and b/client/3rd/bin/png.dll differ
diff --git a/client/3rd/bin/prop.txt b/client/3rd/bin/prop.txt
new file mode 100755
index 0000000000000000000000000000000000000000..bcb2c74a9fce413279284d5f8c3cb1fd6e0a502d
--- /dev/null
+++ b/client/3rd/bin/prop.txt
@@ -0,0 +1,20 @@
+log4cplus.rootLogger=TRACE, ROLLING_LOG_FILE
+
+#######################################################################
+# STDOUT #
+#######################################################################
+log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
+log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
+log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S,%q} [%-5t] %-5p %20c - %m%n
+
+#######################################################################
+# ROLLING_LOG_FILE #
+#######################################################################
+log4cplus.appender.ROLLING_LOG_FILE=log4cplus::RollingFileAppender
+log4cplus.appender.ROLLING_LOG_FILE.File=.\prop.log
+log4cplus.appender.ROLLING_LOG_FILE.MaxFileSize=10240KB
+log4cplus.appender.ROLLING_LOG_FILE.MaxBackupIndex=5
+# Truncate 'test' if it aleady exists.
+log4cplus.appender.ROLLING_LOG_FILE.Append=false
+log4cplus.appender.ROLLING_LOG_FILE.layout=log4cplus::PatternLayout
+log4cplus.appender.ROLLING_LOG_FILE.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S,%q} [%-5t] %-5p %20c - %m%n
\ No newline at end of file
diff --git a/client/3rd/bin/proxy.dll b/client/3rd/bin/proxy.dll
new file mode 100755
index 0000000000000000000000000000000000000000..e8ff6a5946fce3ae3556667ddebf337c962e6de6
Binary files /dev/null and b/client/3rd/bin/proxy.dll differ
diff --git a/client/3rd/bin/rtsp.dll b/client/3rd/bin/rtsp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1b182c2fba7d4c50ab7745fb4344c5926154f05c
Binary files /dev/null and b/client/3rd/bin/rtsp.dll differ
diff --git a/client/3rd/bin/sqlite.dll b/client/3rd/bin/sqlite.dll
new file mode 100755
index 0000000000000000000000000000000000000000..4ded3ff8607bb0d2a94573d79d0d274e5a99bd69
Binary files /dev/null and b/client/3rd/bin/sqlite.dll differ
diff --git a/client/3rd/bin/ssl.dll b/client/3rd/bin/ssl.dll
new file mode 100755
index 0000000000000000000000000000000000000000..00dbc11f46f6d3b59170cbe1f07293b110f08576
Binary files /dev/null and b/client/3rd/bin/ssl.dll differ
diff --git a/client/3rd/bin/websocket.dll b/client/3rd/bin/websocket.dll
new file mode 100755
index 0000000000000000000000000000000000000000..7521e5a2d8b1f1194d31b85c743f6cde67185be0
Binary files /dev/null and b/client/3rd/bin/websocket.dll differ
diff --git a/client/3rd/bin/x64/asyncore.dll b/client/3rd/bin/x64/asyncore.dll
new file mode 100755
index 0000000000000000000000000000000000000000..362a7d2ccbdf77de586a3ca861ae74bdf2284aad
Binary files /dev/null and b/client/3rd/bin/x64/asyncore.dll differ
diff --git a/client/3rd/bin/x64/asynfile.dll b/client/3rd/bin/x64/asynfile.dll
new file mode 100755
index 0000000000000000000000000000000000000000..7da0bcdb0ba98b67ef629e38614f46995922acf0
Binary files /dev/null and b/client/3rd/bin/x64/asynfile.dll differ
diff --git a/client/3rd/bin/x64/asynipcs.dll b/client/3rd/bin/x64/asynipcs.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1950592871c3e50c4e6a382db8d66a832ca6dd6a
Binary files /dev/null and b/client/3rd/bin/x64/asynipcs.dll differ
diff --git a/client/3rd/bin/x64/asynneta.dll b/client/3rd/bin/x64/asynneta.dll
new file mode 100755
index 0000000000000000000000000000000000000000..0e9b8d650d3ca08e2df383be16f28ebd2fbf7689
Binary files /dev/null and b/client/3rd/bin/x64/asynneta.dll differ
diff --git a/client/3rd/bin/x64/asynsock.dll b/client/3rd/bin/x64/asynsock.dll
new file mode 100755
index 0000000000000000000000000000000000000000..e594b968da840dd699c1c7641b6f212a33048be8
Binary files /dev/null and b/client/3rd/bin/x64/asynsock.dll differ
diff --git a/client/3rd/bin/x64/console.dll b/client/3rd/bin/x64/console.dll
new file mode 100755
index 0000000000000000000000000000000000000000..9c9127fd50fce737a3a3a3f2cfaf128d93427011
Binary files /dev/null and b/client/3rd/bin/x64/console.dll differ
diff --git a/client/3rd/bin/x64/crashexplorer.dll b/client/3rd/bin/x64/crashexplorer.dll
new file mode 100755
index 0000000000000000000000000000000000000000..66759fceb642576ebf907a12e274708746564383
Binary files /dev/null and b/client/3rd/bin/x64/crashexplorer.dll differ
diff --git a/client/3rd/bin/x64/dbghelp.dll b/client/3rd/bin/x64/dbghelp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..7a9b90728284480b27d8a5fe8174f84161ce9267
Binary files /dev/null and b/client/3rd/bin/x64/dbghelp.dll differ
diff --git a/client/3rd/bin/x64/dns.dll b/client/3rd/bin/x64/dns.dll
new file mode 100755
index 0000000000000000000000000000000000000000..c2621f2eb875ea6afb0a1e983ac101d0fc53a5f6
Binary files /dev/null and b/client/3rd/bin/x64/dns.dll differ
diff --git a/client/3rd/bin/x64/dtp.dll b/client/3rd/bin/x64/dtp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1a8a56ee60834378e8eb3e8e99ad738d2dd606b5
Binary files /dev/null and b/client/3rd/bin/x64/dtp.dll differ
diff --git a/client/3rd/bin/x64/ftp.dll b/client/3rd/bin/x64/ftp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..fadc7aa7a2350bcdf0c9d445dd21de4a587437da
Binary files /dev/null and b/client/3rd/bin/x64/ftp.dll differ
diff --git a/client/3rd/bin/x64/http.dll b/client/3rd/bin/x64/http.dll
new file mode 100755
index 0000000000000000000000000000000000000000..6be8b83fcb47ce1357a101b667c8b4d0b1f37a4d
Binary files /dev/null and b/client/3rd/bin/x64/http.dll differ
diff --git a/client/3rd/bin/x64/jpeg.dll b/client/3rd/bin/x64/jpeg.dll
new file mode 100755
index 0000000000000000000000000000000000000000..03845c4483756ecc43c2a3365b4ae3582808256a
Binary files /dev/null and b/client/3rd/bin/x64/jpeg.dll differ
diff --git a/client/3rd/bin/x64/log4cplus.dll b/client/3rd/bin/x64/log4cplus.dll
new file mode 100755
index 0000000000000000000000000000000000000000..3c53e42abe1da4a5089ff16f955873056d07a542
Binary files /dev/null and b/client/3rd/bin/x64/log4cplus.dll differ
diff --git a/client/3rd/bin/x64/lua.dll b/client/3rd/bin/x64/lua.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1d3702ac2617258696d6050d9f73003c60ba25b8
Binary files /dev/null and b/client/3rd/bin/x64/lua.dll differ
diff --git a/client/3rd/bin/x64/png.dll b/client/3rd/bin/x64/png.dll
new file mode 100755
index 0000000000000000000000000000000000000000..656f46a868e575a96ff8ab934c8553d352a6389c
Binary files /dev/null and b/client/3rd/bin/x64/png.dll differ
diff --git a/client/3rd/bin/x64/prop.txt b/client/3rd/bin/x64/prop.txt
new file mode 100755
index 0000000000000000000000000000000000000000..bcb2c74a9fce413279284d5f8c3cb1fd6e0a502d
--- /dev/null
+++ b/client/3rd/bin/x64/prop.txt
@@ -0,0 +1,20 @@
+log4cplus.rootLogger=TRACE, ROLLING_LOG_FILE
+
+#######################################################################
+# STDOUT #
+#######################################################################
+log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
+log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
+log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S,%q} [%-5t] %-5p %20c - %m%n
+
+#######################################################################
+# ROLLING_LOG_FILE #
+#######################################################################
+log4cplus.appender.ROLLING_LOG_FILE=log4cplus::RollingFileAppender
+log4cplus.appender.ROLLING_LOG_FILE.File=.\prop.log
+log4cplus.appender.ROLLING_LOG_FILE.MaxFileSize=10240KB
+log4cplus.appender.ROLLING_LOG_FILE.MaxBackupIndex=5
+# Truncate 'test' if it aleady exists.
+log4cplus.appender.ROLLING_LOG_FILE.Append=false
+log4cplus.appender.ROLLING_LOG_FILE.layout=log4cplus::PatternLayout
+log4cplus.appender.ROLLING_LOG_FILE.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S,%q} [%-5t] %-5p %20c - %m%n
\ No newline at end of file
diff --git a/client/3rd/bin/x64/proxy.dll b/client/3rd/bin/x64/proxy.dll
new file mode 100755
index 0000000000000000000000000000000000000000..731b6bcf2d4c10e8b2d41170909d31459e3569cd
Binary files /dev/null and b/client/3rd/bin/x64/proxy.dll differ
diff --git a/client/3rd/bin/x64/rtsp.dll b/client/3rd/bin/x64/rtsp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..6e6843b7047570a028df802b14a7cd8b008d6e4a
Binary files /dev/null and b/client/3rd/bin/x64/rtsp.dll differ
diff --git a/client/3rd/bin/x64/sqlite.dll b/client/3rd/bin/x64/sqlite.dll
new file mode 100755
index 0000000000000000000000000000000000000000..a2b22af944b1e760c0f245500754e44caad1beda
Binary files /dev/null and b/client/3rd/bin/x64/sqlite.dll differ
diff --git a/client/3rd/bin/x64/ssl.dll b/client/3rd/bin/x64/ssl.dll
new file mode 100755
index 0000000000000000000000000000000000000000..26d4ff59b54ef272790ef29eda6a47c0226058db
Binary files /dev/null and b/client/3rd/bin/x64/ssl.dll differ
diff --git a/client/3rd/bin/x64/websocket.dll b/client/3rd/bin/x64/websocket.dll
new file mode 100755
index 0000000000000000000000000000000000000000..3ac9384d45f759b19976f626a84806e498eab0c7
Binary files /dev/null and b/client/3rd/bin/x64/websocket.dll differ
diff --git a/client/3rd/bin/x64/zip.dll b/client/3rd/bin/x64/zip.dll
new file mode 100755
index 0000000000000000000000000000000000000000..d26242abda6cf95e076e22047ae9e525d4dab929
Binary files /dev/null and b/client/3rd/bin/x64/zip.dll differ
diff --git a/client/3rd/bin/zip.dll b/client/3rd/bin/zip.dll
new file mode 100755
index 0000000000000000000000000000000000000000..0654f268e1b1b30ef5d7c63ba528ad5245d709a2
Binary files /dev/null and b/client/3rd/bin/zip.dll differ
diff --git a/client/3rd/include/frame/Dtp.h b/client/3rd/include/frame/Dtp.h
new file mode 100755
index 0000000000000000000000000000000000000000..ecfd01f32592b823163bb7c3f4c64908889e0c87
--- /dev/null
+++ b/client/3rd/include/frame/Dtp.h
@@ -0,0 +1,50 @@
+// Dtp.h: interface.
+//
+/////////////////////////////////////////////////////////////////////////////////
+#if !defined(AFX_DTP_H__88966194_6F5D_4303_8670_7EAE695A32B3__INCLUDED_)
+#define AFX_DTP_H__88966194_6F5D_4303_8670_7EAE695A32B3__INCLUDED_
+/*****************************************************************************
+Copyright (c) netsecsp 2012-2032, All rights reserved.
+
+Developer: Shengqian Yang, from China, E-mail: netsecsp@hotmail.com, last updated 05/01/2022
+http://asynframe.sf.net
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above
+copyright notice, this list of conditions and the
+following disclaimer.
+
+* 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.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR
+CONTRIBUTORS 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.
+*****************************************************************************/
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "AsynNetwork_internal.h"
+#include "asm/IDtp.h"
+NAMESPACE_BEGIN(asynsdk)
+
+/////////////////////////////////////////////////////////////////////////////////
+#define IN_Dtp "com.svc.dtp"
+
+NAMESPACE_END(asynsdk)
+
+#endif // !defined(AFX_DTP_H__88966194_6F5D_4303_8670_7EAE695A32B3__INCLUDED_)
\ No newline at end of file
diff --git a/client/3rd/include/frame/asm/IAsynFrame.h b/client/3rd/include/frame/asm/IAsynFrame.h
index 7417c54601af846ed444cbc11db5b73062509318..fcb71ba282841a583590c5ce0e52d1909761a460 100755
--- a/client/3rd/include/frame/asm/IAsynFrame.h
+++ b/client/3rd/include/frame/asm/IAsynFrame.h
@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 8.00.0603 */
-/* at Sat Jan 28 08:50:47 2023
+/* at Sun Jan 29 15:12:31 2023
*/
/* Compiler settings for IAsynFrame.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603
@@ -3090,8 +3090,7 @@ EXTERN_C const IID IID_InstancesManager;
/* [in] */ IUnknown *lpObject) = 0;
virtual HRESULT STDMETHODCALLTYPE Require(
- /* [in] */ STRING Owner,
- /* [out] */ IUnknown **ppObject) = 0;
+ /* [in] */ STRING Owner) = 0;
virtual HRESULT STDMETHODCALLTYPE Observe(
/* [in] */ handle Soctx) = 0;
@@ -3144,8 +3143,7 @@ EXTERN_C const IID IID_InstancesManager;
HRESULT ( STDMETHODCALLTYPE *Require )(
InstancesManager * This,
- /* [in] */ STRING Owner,
- /* [out] */ IUnknown **ppObject);
+ /* [in] */ STRING Owner);
HRESULT ( STDMETHODCALLTYPE *Observe )(
InstancesManager * This,
@@ -3187,8 +3185,8 @@ EXTERN_C const IID IID_InstancesManager;
#define InstancesManager_SetInstance(This,Name,lpObject) \
( (This)->lpVtbl -> SetInstance(This,Name,lpObject) )
-#define InstancesManager_Require(This,Owner,ppObject) \
- ( (This)->lpVtbl -> Require(This,Owner,ppObject) )
+#define InstancesManager_Require(This,Owner) \
+ ( (This)->lpVtbl -> Require(This,Owner) )
#define InstancesManager_Observe(This,Soctx) \
( (This)->lpVtbl -> Observe(This,Soctx) )
diff --git a/client/3rd/include/frame/asm/IAsynFrame_i.c b/client/3rd/include/frame/asm/IAsynFrame_i.c
index c7f3bb366bd954ff4074f4f88297980c0e7f2fa7..66f7d95534beafc6f074f828805f6a95c921f0cc 100755
--- a/client/3rd/include/frame/asm/IAsynFrame_i.c
+++ b/client/3rd/include/frame/asm/IAsynFrame_i.c
@@ -6,7 +6,7 @@
/* File created by MIDL compiler version 8.00.0603 */
-/* at Sat Jan 28 08:50:47 2023
+/* at Sun Jan 29 15:12:31 2023
*/
/* Compiler settings for IAsynFrame.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603
diff --git a/client/3rd/lib/asynsdk_mini-MD.lib b/client/3rd/lib/asynsdk_mini-MD.lib
index c804e583575c683d0ee8cff6012c2d6b3ae400aa..2a4a8b922da8b0c4f76b72e2f796de9eb5507f54 100755
Binary files a/client/3rd/lib/asynsdk_mini-MD.lib and b/client/3rd/lib/asynsdk_mini-MD.lib differ
diff --git a/client/3rd/lib/asynsdk_mini-MDd.lib b/client/3rd/lib/asynsdk_mini-MDd.lib
index c24957a66d0e3b866d5033331696d498829050d9..75b8a1fde9b5ebda0f7027100d14b9e546c0a8d7 100755
Binary files a/client/3rd/lib/asynsdk_mini-MDd.lib and b/client/3rd/lib/asynsdk_mini-MDd.lib differ
diff --git a/client/3rd/lib/asynsdk_mini-MT.lib b/client/3rd/lib/asynsdk_mini-MT.lib
index 856a9fd28113b6c3644ca1ea0f4d7fefc42fb9fd..5145ae599feb3d7ff7ebb02389790dd82aab4933 100755
Binary files a/client/3rd/lib/asynsdk_mini-MT.lib and b/client/3rd/lib/asynsdk_mini-MT.lib differ
diff --git a/client/3rd/lib/asynsdk_mini-MTd.lib b/client/3rd/lib/asynsdk_mini-MTd.lib
index 82ca407193e920741b7d3caab1a8737fb57e6446..5209412134bc8e3ce6a12f3f94890d17422fc4ce 100755
Binary files a/client/3rd/lib/asynsdk_mini-MTd.lib and b/client/3rd/lib/asynsdk_mini-MTd.lib differ
diff --git a/client/3rd/lib/jpeg_dll.lib b/client/3rd/lib/jpeg_dll.lib
new file mode 100755
index 0000000000000000000000000000000000000000..17504d6ac66c0a3cc59418c03ff3759b89b1e536
Binary files /dev/null and b/client/3rd/lib/jpeg_dll.lib differ
diff --git a/client/3rd/lib/png_dll.lib b/client/3rd/lib/png_dll.lib
new file mode 100755
index 0000000000000000000000000000000000000000..b5bfa467b71f2700599b812bf525a2b6531e0d41
Binary files /dev/null and b/client/3rd/lib/png_dll.lib differ
diff --git a/client/3rd/lib/x64/asynsdk_mini-MD.lib b/client/3rd/lib/x64/asynsdk_mini-MD.lib
index d980e2f0b6e697fa8dcbf77ec8dcdc08c5e2e2f5..d4a1faa0ee49184967acf2597ce9c1ca63351f83 100755
Binary files a/client/3rd/lib/x64/asynsdk_mini-MD.lib and b/client/3rd/lib/x64/asynsdk_mini-MD.lib differ
diff --git a/client/3rd/lib/x64/asynsdk_mini-MDd.lib b/client/3rd/lib/x64/asynsdk_mini-MDd.lib
index 369651a57e4674b87a897e5d3cd8d9e9efb26f8c..ce7988dd8c20b85de71d5d9f32d7d21b83cfcdc5 100755
Binary files a/client/3rd/lib/x64/asynsdk_mini-MDd.lib and b/client/3rd/lib/x64/asynsdk_mini-MDd.lib differ
diff --git a/client/3rd/lib/x64/asynsdk_mini-MT.lib b/client/3rd/lib/x64/asynsdk_mini-MT.lib
index eabb0e0b55ea7a0c0ae0bb0f3214add4c4fe676f..ed674f6ee5757f4f6dd558c5b8f1d8a4d4ccfbe3 100755
Binary files a/client/3rd/lib/x64/asynsdk_mini-MT.lib and b/client/3rd/lib/x64/asynsdk_mini-MT.lib differ
diff --git a/client/3rd/lib/x64/asynsdk_mini-MTd.lib b/client/3rd/lib/x64/asynsdk_mini-MTd.lib
index 12ca4cb522be0154a9228beb53ba9518e67c2d01..32dc32d8aec112a944c8aa4f0c085a4652a3bc44 100755
Binary files a/client/3rd/lib/x64/asynsdk_mini-MTd.lib and b/client/3rd/lib/x64/asynsdk_mini-MTd.lib differ
diff --git a/client/3rd/lib/x64/jpeg_dll.lib b/client/3rd/lib/x64/jpeg_dll.lib
new file mode 100755
index 0000000000000000000000000000000000000000..2722cc29a8cd4ecf7491a26d46894f991fb44eb4
Binary files /dev/null and b/client/3rd/lib/x64/jpeg_dll.lib differ
diff --git a/client/3rd/lib/x64/png_dll.lib b/client/3rd/lib/x64/png_dll.lib
new file mode 100755
index 0000000000000000000000000000000000000000..ee4f80a014aff8ee6699d1df42f6c6014a879df4
Binary files /dev/null and b/client/3rd/lib/x64/png_dll.lib differ
diff --git a/client/bin/ahttpclient-x64.exe b/client/bin/ahttpclient-x64.exe
index 40ef1a0b54a9250cd92903fc704a17a4d1ae1eaf..de778aff3342b29beb1b668ca77135b5de2fa645 100755
Binary files a/client/bin/ahttpclient-x64.exe and b/client/bin/ahttpclient-x64.exe differ
diff --git a/client/bin/ahttpclient.exe b/client/bin/ahttpclient.exe
index 2bd9159f2a8a82bc4574e3fcadf9a973a171629d..6b6de308463531112d8f4a514b3e89b321d9191e 100755
Binary files a/client/bin/ahttpclient.exe and b/client/bin/ahttpclient.exe differ
diff --git a/client/project/windows/ahttpclient.vcxproj b/client/project/windows/ahttpclient.vcxproj
index 4a9bf3077a95900abf36be703036e820e3965016..187b7faaae5a8e13fbe138dd10d51c347314d5b5 100755
--- a/client/project/windows/ahttpclient.vcxproj
+++ b/client/project/windows/ahttpclient.vcxproj
@@ -67,18 +67,22 @@
..\..\bin\
.\Debug\
+ $(ProjectName)
- ..\..\bin\$(Platform)\
+ ..\..\bin\
.\Debug\
+ $(ProjectName)-$(Platform)
..\..\bin\
.\Release\
+ $(ProjectName)
- ..\..\bin\$(Platform)\
+ ..\..\bin\
.\Release\
+ $(ProjectName)-$(Platform)
@@ -94,7 +98,7 @@
4819
- $(OutDir)ahttpclient.exe
+ $(OutDir)$(ProjectName).exe
..\..\3rd\lib;%(AdditionalLibraryDirectories)
true
$(OutDir)ahttpclient.pdb
@@ -115,7 +119,7 @@
4819
- $(OutDir)ahttpclient.exe
+ $(OutDir)$(ProjectName)-$(Platform).exe
..\..\3rd\lib\x64;%(AdditionalLibraryDirectories)
true
$(OutDir)ahttpclient.pdb
@@ -133,7 +137,7 @@
4819
- $(OutDir)ahttpclient.exe
+ $(OutDir)$(ProjectName).exe
..\..\3rd\lib;%(AdditionalLibraryDirectories)
true
Console
@@ -153,7 +157,7 @@
4819
- $(OutDir)ahttpclient.exe
+ $(OutDir)$(ProjectName)-$(Platform).exe
..\..\3rd\lib\x64;%(AdditionalLibraryDirectories)
true
Console
diff --git a/client/project/windows/ahttpclient_2013.vcxproj b/client/project/windows/ahttpclient_2013.vcxproj
index fcebe6b98b8a16953eacfc8f71ecf271b9cfda19..aa2a46840bb27f2cce986f1ca0c29b46555b811c 100755
--- a/client/project/windows/ahttpclient_2013.vcxproj
+++ b/client/project/windows/ahttpclient_2013.vcxproj
@@ -68,16 +68,18 @@
.\Debug\
- ..\..\bin\$(Platform)\
+ ..\..\bin\
.\Debug\
+ $(ProjectName)-$(Platform)
..\..\bin\
.\Release\
- ..\..\bin\$(Platform)\
+ ..\..\bin\
.\Release\
+ $(ProjectName)-$(Platform)
@@ -93,7 +95,7 @@
4819
- $(OutDir)ahttpclient.exe
+ $(OutDir)$(ProjectName).exe
..\..\3rd\lib;%(AdditionalLibraryDirectories)
true
$(OutDir)ahttpclient.pdb
@@ -114,7 +116,7 @@
4819
- $(OutDir)ahttpclient.exe
+ $(OutDir)$(ProjectName)-$(Platform).exe
..\..\3rd\lib\x64;%(AdditionalLibraryDirectories)
true
$(OutDir)ahttpclient.pdb
@@ -132,7 +134,7 @@
4819
- $(OutDir)ahttpclient.exe
+ $(OutDir)$(ProjectName).exe
..\..\3rd\lib;%(AdditionalLibraryDirectories)
true
Console
@@ -152,7 +154,7 @@
4819
- $(OutDir)ahttpclient.exe
+ $(OutDir)$(ProjectName)-$(Platform).exe
..\..\3rd\lib\x64;%(AdditionalLibraryDirectories)
true
Console
diff --git a/client/src/Downloader.cpp b/client/src/Downloader.cpp
index d8d87582fc50fbbc8b6e66e910c19c51b7974480..d04c109d8231cbab450aaaf26d967ad4f896fbc7 100755
--- a/client/src/Downloader.cpp
+++ b/client/src/Downloader.cpp
@@ -176,16 +176,16 @@ HRESULT CDownloader::OnIomsgNotify( uint64_t lParam1, uint64_t lAction, IAsynIoO
break;
}
- m_spInstanceManager->Require(STRING_from_string(IN_AsynFileSystem), 0);
- CComPtr spAsynFileSystem;
- HRESULT r1 = m_spInstanceManager->GetInstance(STRING_from_string(IN_AsynFileSystem), IID_IAsynFileSystem, (void **)&spAsynFileSystem);
- if( r1 != S_OK )
+ if( m_spInstanceManager->Require(STRING_from_string(IN_AsynFileSystem)) != S_OK )
{
printf("can't load plugin: %s\n", IN_AsynFileSystem);
SetEvent(m_hNotify);
break;
}
+ CComPtr spAsynFileSystem;
+ m_spInstanceManager->GetInstance(STRING_from_string(IN_AsynFileSystem), IID_IAsynFileSystem, (void **)&spAsynFileSystem);
+
CComPtr spAsynFile;
spAsynFileSystem->CreateAsynFile(&spAsynFile);
HRESULT r2 = spAsynFile->Open( m_spAsynFrameThread,
diff --git a/client/src/Main.cpp b/client/src/Main.cpp
index b97afd14a2bc42f12dc96098404b20c3a0f4c2b6..c1314b87a9d61b035880b9470b27e5a79f199626 100755
--- a/client/src/Main.cpp
+++ b/client/src/Main.cpp
@@ -93,7 +93,7 @@ int _tmain(int argc, _TCHAR *argv[])
{
InstancesManager *lpInstancesManager = GetInstancesManager();
- if( lpInstancesManager->Require(STRING_from_string(IN_AsynNetwork), 0) != S_OK )
+ if( lpInstancesManager->Require(STRING_from_string(IN_AsynNetwork)) != S_OK )
{
printf("can't load plugin: %s\n", IN_AsynNetwork);
break;
diff --git a/server/3rd/bin/asyncore.dll b/server/3rd/bin/asyncore.dll
new file mode 100755
index 0000000000000000000000000000000000000000..daaebb2008219e7f71615923f8eeb80dd77785bf
Binary files /dev/null and b/server/3rd/bin/asyncore.dll differ
diff --git a/server/3rd/bin/asynfile.dll b/server/3rd/bin/asynfile.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1f0c9213a704430df37f7bf6d153041c20c2030b
Binary files /dev/null and b/server/3rd/bin/asynfile.dll differ
diff --git a/server/3rd/bin/asynipcs.dll b/server/3rd/bin/asynipcs.dll
new file mode 100755
index 0000000000000000000000000000000000000000..3d2a54447074a6188a8ffd3e75417398bf4eb87a
Binary files /dev/null and b/server/3rd/bin/asynipcs.dll differ
diff --git a/server/3rd/bin/asynneta.dll b/server/3rd/bin/asynneta.dll
new file mode 100755
index 0000000000000000000000000000000000000000..ba73c726d4ab48a7684f7a7dcd39525cdc615e10
Binary files /dev/null and b/server/3rd/bin/asynneta.dll differ
diff --git a/server/3rd/bin/asynsock.dll b/server/3rd/bin/asynsock.dll
new file mode 100755
index 0000000000000000000000000000000000000000..072eae1c1acd592a0b5d740d48bb048fc6c6935b
Binary files /dev/null and b/server/3rd/bin/asynsock.dll differ
diff --git a/server/3rd/bin/console.dll b/server/3rd/bin/console.dll
new file mode 100755
index 0000000000000000000000000000000000000000..f7a291a11a8394a72415a403aa707e87d6a1c1f8
Binary files /dev/null and b/server/3rd/bin/console.dll differ
diff --git a/server/3rd/bin/crashexplorer.dll b/server/3rd/bin/crashexplorer.dll
new file mode 100755
index 0000000000000000000000000000000000000000..d5f318a5e875fa87f14d0ffee26e9c54f5a72648
Binary files /dev/null and b/server/3rd/bin/crashexplorer.dll differ
diff --git a/server/3rd/bin/dbghelp.dll b/server/3rd/bin/dbghelp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..6b0f88a6c282a878e9f1389e8ecb492a2869f2e6
Binary files /dev/null and b/server/3rd/bin/dbghelp.dll differ
diff --git a/server/3rd/bin/dns.dll b/server/3rd/bin/dns.dll
new file mode 100755
index 0000000000000000000000000000000000000000..d45ff654db938b13e1ba6a6d5db6f01edea50d9b
Binary files /dev/null and b/server/3rd/bin/dns.dll differ
diff --git a/server/3rd/bin/dtp.dll b/server/3rd/bin/dtp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..0d98b1bdb92c4e4b703df1f6e86fdcc6b6faadbd
Binary files /dev/null and b/server/3rd/bin/dtp.dll differ
diff --git a/server/3rd/bin/ftp.dll b/server/3rd/bin/ftp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..981c324e822d62ddec217ed50c3ce70715391bad
Binary files /dev/null and b/server/3rd/bin/ftp.dll differ
diff --git a/server/3rd/bin/http.dll b/server/3rd/bin/http.dll
new file mode 100755
index 0000000000000000000000000000000000000000..ebb924a86ba5e30d19eb10198bfcca9c240ad507
Binary files /dev/null and b/server/3rd/bin/http.dll differ
diff --git a/server/3rd/bin/jpeg.dll b/server/3rd/bin/jpeg.dll
new file mode 100755
index 0000000000000000000000000000000000000000..611b49d34e77e6edd6f4ce4f4eb669da728aaba0
Binary files /dev/null and b/server/3rd/bin/jpeg.dll differ
diff --git a/server/3rd/bin/log4cplus.dll b/server/3rd/bin/log4cplus.dll
new file mode 100755
index 0000000000000000000000000000000000000000..86bf1cb47282f0701ffb14f05d64e293eddd2082
Binary files /dev/null and b/server/3rd/bin/log4cplus.dll differ
diff --git a/server/3rd/bin/lua.dll b/server/3rd/bin/lua.dll
new file mode 100755
index 0000000000000000000000000000000000000000..944a5585edf027b8ba0b7bcf57eaaf8b72828c89
Binary files /dev/null and b/server/3rd/bin/lua.dll differ
diff --git a/server/3rd/bin/png.dll b/server/3rd/bin/png.dll
new file mode 100755
index 0000000000000000000000000000000000000000..3e7c869d65de2bb364ec973d86abf543e475cfe6
Binary files /dev/null and b/server/3rd/bin/png.dll differ
diff --git a/server/3rd/bin/prop.txt b/server/3rd/bin/prop.txt
new file mode 100755
index 0000000000000000000000000000000000000000..bcb2c74a9fce413279284d5f8c3cb1fd6e0a502d
--- /dev/null
+++ b/server/3rd/bin/prop.txt
@@ -0,0 +1,20 @@
+log4cplus.rootLogger=TRACE, ROLLING_LOG_FILE
+
+#######################################################################
+# STDOUT #
+#######################################################################
+log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
+log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
+log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S,%q} [%-5t] %-5p %20c - %m%n
+
+#######################################################################
+# ROLLING_LOG_FILE #
+#######################################################################
+log4cplus.appender.ROLLING_LOG_FILE=log4cplus::RollingFileAppender
+log4cplus.appender.ROLLING_LOG_FILE.File=.\prop.log
+log4cplus.appender.ROLLING_LOG_FILE.MaxFileSize=10240KB
+log4cplus.appender.ROLLING_LOG_FILE.MaxBackupIndex=5
+# Truncate 'test' if it aleady exists.
+log4cplus.appender.ROLLING_LOG_FILE.Append=false
+log4cplus.appender.ROLLING_LOG_FILE.layout=log4cplus::PatternLayout
+log4cplus.appender.ROLLING_LOG_FILE.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S,%q} [%-5t] %-5p %20c - %m%n
\ No newline at end of file
diff --git a/server/3rd/bin/proxy.dll b/server/3rd/bin/proxy.dll
new file mode 100755
index 0000000000000000000000000000000000000000..e8ff6a5946fce3ae3556667ddebf337c962e6de6
Binary files /dev/null and b/server/3rd/bin/proxy.dll differ
diff --git a/server/3rd/bin/rtsp.dll b/server/3rd/bin/rtsp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1b182c2fba7d4c50ab7745fb4344c5926154f05c
Binary files /dev/null and b/server/3rd/bin/rtsp.dll differ
diff --git a/server/3rd/bin/sqlite.dll b/server/3rd/bin/sqlite.dll
new file mode 100755
index 0000000000000000000000000000000000000000..4ded3ff8607bb0d2a94573d79d0d274e5a99bd69
Binary files /dev/null and b/server/3rd/bin/sqlite.dll differ
diff --git a/server/3rd/bin/ssl.dll b/server/3rd/bin/ssl.dll
new file mode 100755
index 0000000000000000000000000000000000000000..00dbc11f46f6d3b59170cbe1f07293b110f08576
Binary files /dev/null and b/server/3rd/bin/ssl.dll differ
diff --git a/server/3rd/bin/websocket.dll b/server/3rd/bin/websocket.dll
new file mode 100755
index 0000000000000000000000000000000000000000..7521e5a2d8b1f1194d31b85c743f6cde67185be0
Binary files /dev/null and b/server/3rd/bin/websocket.dll differ
diff --git a/server/3rd/bin/x64/asyncore.dll b/server/3rd/bin/x64/asyncore.dll
new file mode 100755
index 0000000000000000000000000000000000000000..362a7d2ccbdf77de586a3ca861ae74bdf2284aad
Binary files /dev/null and b/server/3rd/bin/x64/asyncore.dll differ
diff --git a/server/3rd/bin/x64/asynfile.dll b/server/3rd/bin/x64/asynfile.dll
new file mode 100755
index 0000000000000000000000000000000000000000..7da0bcdb0ba98b67ef629e38614f46995922acf0
Binary files /dev/null and b/server/3rd/bin/x64/asynfile.dll differ
diff --git a/server/3rd/bin/x64/asynipcs.dll b/server/3rd/bin/x64/asynipcs.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1950592871c3e50c4e6a382db8d66a832ca6dd6a
Binary files /dev/null and b/server/3rd/bin/x64/asynipcs.dll differ
diff --git a/server/3rd/bin/x64/asynneta.dll b/server/3rd/bin/x64/asynneta.dll
new file mode 100755
index 0000000000000000000000000000000000000000..0e9b8d650d3ca08e2df383be16f28ebd2fbf7689
Binary files /dev/null and b/server/3rd/bin/x64/asynneta.dll differ
diff --git a/server/3rd/bin/x64/asynsock.dll b/server/3rd/bin/x64/asynsock.dll
new file mode 100755
index 0000000000000000000000000000000000000000..e594b968da840dd699c1c7641b6f212a33048be8
Binary files /dev/null and b/server/3rd/bin/x64/asynsock.dll differ
diff --git a/server/3rd/bin/x64/console.dll b/server/3rd/bin/x64/console.dll
new file mode 100755
index 0000000000000000000000000000000000000000..9c9127fd50fce737a3a3a3f2cfaf128d93427011
Binary files /dev/null and b/server/3rd/bin/x64/console.dll differ
diff --git a/server/3rd/bin/x64/crashexplorer.dll b/server/3rd/bin/x64/crashexplorer.dll
new file mode 100755
index 0000000000000000000000000000000000000000..66759fceb642576ebf907a12e274708746564383
Binary files /dev/null and b/server/3rd/bin/x64/crashexplorer.dll differ
diff --git a/server/3rd/bin/x64/dbghelp.dll b/server/3rd/bin/x64/dbghelp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..7a9b90728284480b27d8a5fe8174f84161ce9267
Binary files /dev/null and b/server/3rd/bin/x64/dbghelp.dll differ
diff --git a/server/3rd/bin/x64/dns.dll b/server/3rd/bin/x64/dns.dll
new file mode 100755
index 0000000000000000000000000000000000000000..c2621f2eb875ea6afb0a1e983ac101d0fc53a5f6
Binary files /dev/null and b/server/3rd/bin/x64/dns.dll differ
diff --git a/server/3rd/bin/x64/dtp.dll b/server/3rd/bin/x64/dtp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1a8a56ee60834378e8eb3e8e99ad738d2dd606b5
Binary files /dev/null and b/server/3rd/bin/x64/dtp.dll differ
diff --git a/server/3rd/bin/x64/ftp.dll b/server/3rd/bin/x64/ftp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..fadc7aa7a2350bcdf0c9d445dd21de4a587437da
Binary files /dev/null and b/server/3rd/bin/x64/ftp.dll differ
diff --git a/server/3rd/bin/x64/http.dll b/server/3rd/bin/x64/http.dll
new file mode 100755
index 0000000000000000000000000000000000000000..6be8b83fcb47ce1357a101b667c8b4d0b1f37a4d
Binary files /dev/null and b/server/3rd/bin/x64/http.dll differ
diff --git a/server/3rd/bin/x64/jpeg.dll b/server/3rd/bin/x64/jpeg.dll
new file mode 100755
index 0000000000000000000000000000000000000000..03845c4483756ecc43c2a3365b4ae3582808256a
Binary files /dev/null and b/server/3rd/bin/x64/jpeg.dll differ
diff --git a/server/3rd/bin/x64/log4cplus.dll b/server/3rd/bin/x64/log4cplus.dll
new file mode 100755
index 0000000000000000000000000000000000000000..3c53e42abe1da4a5089ff16f955873056d07a542
Binary files /dev/null and b/server/3rd/bin/x64/log4cplus.dll differ
diff --git a/server/3rd/bin/x64/lua.dll b/server/3rd/bin/x64/lua.dll
new file mode 100755
index 0000000000000000000000000000000000000000..1d3702ac2617258696d6050d9f73003c60ba25b8
Binary files /dev/null and b/server/3rd/bin/x64/lua.dll differ
diff --git a/server/3rd/bin/x64/png.dll b/server/3rd/bin/x64/png.dll
new file mode 100755
index 0000000000000000000000000000000000000000..656f46a868e575a96ff8ab934c8553d352a6389c
Binary files /dev/null and b/server/3rd/bin/x64/png.dll differ
diff --git a/server/3rd/bin/x64/prop.txt b/server/3rd/bin/x64/prop.txt
new file mode 100755
index 0000000000000000000000000000000000000000..bcb2c74a9fce413279284d5f8c3cb1fd6e0a502d
--- /dev/null
+++ b/server/3rd/bin/x64/prop.txt
@@ -0,0 +1,20 @@
+log4cplus.rootLogger=TRACE, ROLLING_LOG_FILE
+
+#######################################################################
+# STDOUT #
+#######################################################################
+log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
+log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
+log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S,%q} [%-5t] %-5p %20c - %m%n
+
+#######################################################################
+# ROLLING_LOG_FILE #
+#######################################################################
+log4cplus.appender.ROLLING_LOG_FILE=log4cplus::RollingFileAppender
+log4cplus.appender.ROLLING_LOG_FILE.File=.\prop.log
+log4cplus.appender.ROLLING_LOG_FILE.MaxFileSize=10240KB
+log4cplus.appender.ROLLING_LOG_FILE.MaxBackupIndex=5
+# Truncate 'test' if it aleady exists.
+log4cplus.appender.ROLLING_LOG_FILE.Append=false
+log4cplus.appender.ROLLING_LOG_FILE.layout=log4cplus::PatternLayout
+log4cplus.appender.ROLLING_LOG_FILE.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S,%q} [%-5t] %-5p %20c - %m%n
\ No newline at end of file
diff --git a/server/3rd/bin/x64/proxy.dll b/server/3rd/bin/x64/proxy.dll
new file mode 100755
index 0000000000000000000000000000000000000000..731b6bcf2d4c10e8b2d41170909d31459e3569cd
Binary files /dev/null and b/server/3rd/bin/x64/proxy.dll differ
diff --git a/server/3rd/bin/x64/rtsp.dll b/server/3rd/bin/x64/rtsp.dll
new file mode 100755
index 0000000000000000000000000000000000000000..6e6843b7047570a028df802b14a7cd8b008d6e4a
Binary files /dev/null and b/server/3rd/bin/x64/rtsp.dll differ
diff --git a/server/3rd/bin/x64/sqlite.dll b/server/3rd/bin/x64/sqlite.dll
new file mode 100755
index 0000000000000000000000000000000000000000..a2b22af944b1e760c0f245500754e44caad1beda
Binary files /dev/null and b/server/3rd/bin/x64/sqlite.dll differ
diff --git a/server/3rd/bin/x64/ssl.dll b/server/3rd/bin/x64/ssl.dll
new file mode 100755
index 0000000000000000000000000000000000000000..26d4ff59b54ef272790ef29eda6a47c0226058db
Binary files /dev/null and b/server/3rd/bin/x64/ssl.dll differ
diff --git a/server/3rd/bin/x64/websocket.dll b/server/3rd/bin/x64/websocket.dll
new file mode 100755
index 0000000000000000000000000000000000000000..3ac9384d45f759b19976f626a84806e498eab0c7
Binary files /dev/null and b/server/3rd/bin/x64/websocket.dll differ
diff --git a/server/3rd/bin/x64/zip.dll b/server/3rd/bin/x64/zip.dll
new file mode 100755
index 0000000000000000000000000000000000000000..d26242abda6cf95e076e22047ae9e525d4dab929
Binary files /dev/null and b/server/3rd/bin/x64/zip.dll differ
diff --git a/server/3rd/bin/zip.dll b/server/3rd/bin/zip.dll
new file mode 100755
index 0000000000000000000000000000000000000000..0654f268e1b1b30ef5d7c63ba528ad5245d709a2
Binary files /dev/null and b/server/3rd/bin/zip.dll differ
diff --git a/server/3rd/include/frame/Dtp.h b/server/3rd/include/frame/Dtp.h
new file mode 100755
index 0000000000000000000000000000000000000000..ecfd01f32592b823163bb7c3f4c64908889e0c87
--- /dev/null
+++ b/server/3rd/include/frame/Dtp.h
@@ -0,0 +1,50 @@
+// Dtp.h: interface.
+//
+/////////////////////////////////////////////////////////////////////////////////
+#if !defined(AFX_DTP_H__88966194_6F5D_4303_8670_7EAE695A32B3__INCLUDED_)
+#define AFX_DTP_H__88966194_6F5D_4303_8670_7EAE695A32B3__INCLUDED_
+/*****************************************************************************
+Copyright (c) netsecsp 2012-2032, All rights reserved.
+
+Developer: Shengqian Yang, from China, E-mail: netsecsp@hotmail.com, last updated 05/01/2022
+http://asynframe.sf.net
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above
+copyright notice, this list of conditions and the
+following disclaimer.
+
+* 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.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR
+CONTRIBUTORS 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.
+*****************************************************************************/
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "AsynNetwork_internal.h"
+#include "asm/IDtp.h"
+NAMESPACE_BEGIN(asynsdk)
+
+/////////////////////////////////////////////////////////////////////////////////
+#define IN_Dtp "com.svc.dtp"
+
+NAMESPACE_END(asynsdk)
+
+#endif // !defined(AFX_DTP_H__88966194_6F5D_4303_8670_7EAE695A32B3__INCLUDED_)
\ No newline at end of file
diff --git a/server/3rd/include/frame/asm/IAsynFrame.h b/server/3rd/include/frame/asm/IAsynFrame.h
index 7417c54601af846ed444cbc11db5b73062509318..fcb71ba282841a583590c5ce0e52d1909761a460 100755
--- a/server/3rd/include/frame/asm/IAsynFrame.h
+++ b/server/3rd/include/frame/asm/IAsynFrame.h
@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 8.00.0603 */
-/* at Sat Jan 28 08:50:47 2023
+/* at Sun Jan 29 15:12:31 2023
*/
/* Compiler settings for IAsynFrame.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603
@@ -3090,8 +3090,7 @@ EXTERN_C const IID IID_InstancesManager;
/* [in] */ IUnknown *lpObject) = 0;
virtual HRESULT STDMETHODCALLTYPE Require(
- /* [in] */ STRING Owner,
- /* [out] */ IUnknown **ppObject) = 0;
+ /* [in] */ STRING Owner) = 0;
virtual HRESULT STDMETHODCALLTYPE Observe(
/* [in] */ handle Soctx) = 0;
@@ -3144,8 +3143,7 @@ EXTERN_C const IID IID_InstancesManager;
HRESULT ( STDMETHODCALLTYPE *Require )(
InstancesManager * This,
- /* [in] */ STRING Owner,
- /* [out] */ IUnknown **ppObject);
+ /* [in] */ STRING Owner);
HRESULT ( STDMETHODCALLTYPE *Observe )(
InstancesManager * This,
@@ -3187,8 +3185,8 @@ EXTERN_C const IID IID_InstancesManager;
#define InstancesManager_SetInstance(This,Name,lpObject) \
( (This)->lpVtbl -> SetInstance(This,Name,lpObject) )
-#define InstancesManager_Require(This,Owner,ppObject) \
- ( (This)->lpVtbl -> Require(This,Owner,ppObject) )
+#define InstancesManager_Require(This,Owner) \
+ ( (This)->lpVtbl -> Require(This,Owner) )
#define InstancesManager_Observe(This,Soctx) \
( (This)->lpVtbl -> Observe(This,Soctx) )
diff --git a/server/3rd/include/frame/asm/IAsynFrame_i.c b/server/3rd/include/frame/asm/IAsynFrame_i.c
index c7f3bb366bd954ff4074f4f88297980c0e7f2fa7..66f7d95534beafc6f074f828805f6a95c921f0cc 100755
--- a/server/3rd/include/frame/asm/IAsynFrame_i.c
+++ b/server/3rd/include/frame/asm/IAsynFrame_i.c
@@ -6,7 +6,7 @@
/* File created by MIDL compiler version 8.00.0603 */
-/* at Sat Jan 28 08:50:47 2023
+/* at Sun Jan 29 15:12:31 2023
*/
/* Compiler settings for IAsynFrame.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603
diff --git a/server/3rd/lib/asynsdk_mini-MD.lib b/server/3rd/lib/asynsdk_mini-MD.lib
index c804e583575c683d0ee8cff6012c2d6b3ae400aa..2a4a8b922da8b0c4f76b72e2f796de9eb5507f54 100755
Binary files a/server/3rd/lib/asynsdk_mini-MD.lib and b/server/3rd/lib/asynsdk_mini-MD.lib differ
diff --git a/server/3rd/lib/asynsdk_mini-MDd.lib b/server/3rd/lib/asynsdk_mini-MDd.lib
index c24957a66d0e3b866d5033331696d498829050d9..75b8a1fde9b5ebda0f7027100d14b9e546c0a8d7 100755
Binary files a/server/3rd/lib/asynsdk_mini-MDd.lib and b/server/3rd/lib/asynsdk_mini-MDd.lib differ
diff --git a/server/3rd/lib/asynsdk_mini-MT.lib b/server/3rd/lib/asynsdk_mini-MT.lib
index 856a9fd28113b6c3644ca1ea0f4d7fefc42fb9fd..5145ae599feb3d7ff7ebb02389790dd82aab4933 100755
Binary files a/server/3rd/lib/asynsdk_mini-MT.lib and b/server/3rd/lib/asynsdk_mini-MT.lib differ
diff --git a/server/3rd/lib/asynsdk_mini-MTd.lib b/server/3rd/lib/asynsdk_mini-MTd.lib
index 82ca407193e920741b7d3caab1a8737fb57e6446..5209412134bc8e3ce6a12f3f94890d17422fc4ce 100755
Binary files a/server/3rd/lib/asynsdk_mini-MTd.lib and b/server/3rd/lib/asynsdk_mini-MTd.lib differ
diff --git a/server/3rd/lib/jpeg_dll.lib b/server/3rd/lib/jpeg_dll.lib
new file mode 100755
index 0000000000000000000000000000000000000000..17504d6ac66c0a3cc59418c03ff3759b89b1e536
Binary files /dev/null and b/server/3rd/lib/jpeg_dll.lib differ
diff --git a/server/3rd/lib/png_dll.lib b/server/3rd/lib/png_dll.lib
new file mode 100755
index 0000000000000000000000000000000000000000..b5bfa467b71f2700599b812bf525a2b6531e0d41
Binary files /dev/null and b/server/3rd/lib/png_dll.lib differ
diff --git a/server/3rd/lib/x64/asynsdk_mini-MD.lib b/server/3rd/lib/x64/asynsdk_mini-MD.lib
index d980e2f0b6e697fa8dcbf77ec8dcdc08c5e2e2f5..d4a1faa0ee49184967acf2597ce9c1ca63351f83 100755
Binary files a/server/3rd/lib/x64/asynsdk_mini-MD.lib and b/server/3rd/lib/x64/asynsdk_mini-MD.lib differ
diff --git a/server/3rd/lib/x64/asynsdk_mini-MDd.lib b/server/3rd/lib/x64/asynsdk_mini-MDd.lib
index 369651a57e4674b87a897e5d3cd8d9e9efb26f8c..ce7988dd8c20b85de71d5d9f32d7d21b83cfcdc5 100755
Binary files a/server/3rd/lib/x64/asynsdk_mini-MDd.lib and b/server/3rd/lib/x64/asynsdk_mini-MDd.lib differ
diff --git a/server/3rd/lib/x64/asynsdk_mini-MT.lib b/server/3rd/lib/x64/asynsdk_mini-MT.lib
index eabb0e0b55ea7a0c0ae0bb0f3214add4c4fe676f..ed674f6ee5757f4f6dd558c5b8f1d8a4d4ccfbe3 100755
Binary files a/server/3rd/lib/x64/asynsdk_mini-MT.lib and b/server/3rd/lib/x64/asynsdk_mini-MT.lib differ
diff --git a/server/3rd/lib/x64/asynsdk_mini-MTd.lib b/server/3rd/lib/x64/asynsdk_mini-MTd.lib
index 12ca4cb522be0154a9228beb53ba9518e67c2d01..32dc32d8aec112a944c8aa4f0c085a4652a3bc44 100755
Binary files a/server/3rd/lib/x64/asynsdk_mini-MTd.lib and b/server/3rd/lib/x64/asynsdk_mini-MTd.lib differ
diff --git a/server/3rd/lib/x64/jpeg_dll.lib b/server/3rd/lib/x64/jpeg_dll.lib
new file mode 100755
index 0000000000000000000000000000000000000000..2722cc29a8cd4ecf7491a26d46894f991fb44eb4
Binary files /dev/null and b/server/3rd/lib/x64/jpeg_dll.lib differ
diff --git a/server/3rd/lib/x64/png_dll.lib b/server/3rd/lib/x64/png_dll.lib
new file mode 100755
index 0000000000000000000000000000000000000000..ee4f80a014aff8ee6699d1df42f6c6014a879df4
Binary files /dev/null and b/server/3rd/lib/x64/png_dll.lib differ
diff --git a/server/bin/ahttpserver-x64.exe b/server/bin/ahttpserver-x64.exe
index af16603a32eac35079ac0c80e7a939480d84d7e1..8847a5967cfe68f203d3663524a8a56f7d1d6896 100755
Binary files a/server/bin/ahttpserver-x64.exe and b/server/bin/ahttpserver-x64.exe differ
diff --git a/server/bin/ahttpserver.exe b/server/bin/ahttpserver.exe
index 1a51abdcc521d3982ecccee4d070e2683c80a949..741db08a4adcf751b38f747f0e6f8e24bbb4229d 100755
Binary files a/server/bin/ahttpserver.exe and b/server/bin/ahttpserver.exe differ
diff --git a/server/bin/config.txt b/server/bin/config.txt
index 0e155f29bef7c186fefce8cd5eabfc10e02108d0..eb0531d0a2db8a2214dc818d59ebc2cc829a20fd 100755
--- a/server/bin/config.txt
+++ b/server/bin/config.txt
@@ -9,7 +9,7 @@ port=80
[ssl]
port=443
-cert=.\server.p12
+cert=server.p12
password=123456
[session]
@@ -18,7 +18,7 @@ max_sendspeed=-1
[website]
#配置页面目录
-home=d:\www\web
+home=d:\\www\\web
#监控目录变化, 自动生成index.html
active_detech_files_changed=1
\ No newline at end of file
diff --git a/server/project/windows/ahttpserver.vcxproj b/server/project/windows/ahttpserver.vcxproj
index 050b119a08cb0aa8076d402c2155ad6b01d3325d..dd919c638858c29376e1d2312981f6e0bbb0c98c 100755
--- a/server/project/windows/ahttpserver.vcxproj
+++ b/server/project/windows/ahttpserver.vcxproj
@@ -67,18 +67,22 @@
..\..\bin\
.\Debug\
+ $(ProjectName)
- ..\..\bin\$(Platform)\
+ ..\..\bin\
.\Debug\
+ $(ProjectName)-$(Platform)
..\..\bin\
.\Release\
+ $(ProjectName)
- ..\..\bin\$(Platform)\
+ ..\..\bin\
.\Release\
+ $(ProjectName)-$(Platform)
@@ -94,7 +98,7 @@
4819
- $(OutDir)ahttpserver.exe
+ $(OutDir)$(ProjectName).exe
..\..\3rd\lib;%(AdditionalLibraryDirectories)
true
$(OutDir)ahttpserver.pdb
@@ -115,7 +119,7 @@
4819
- $(OutDir)ahttpserver.exe
+ $(OutDir)$(ProjectName)-$(Platform).exe
..\..\3rd\lib\x64;%(AdditionalLibraryDirectories)
true
$(OutDir)ahttpserver.pdb
@@ -133,7 +137,7 @@
4819
- $(OutDir)ahttpserver.exe
+ $(OutDir)$(ProjectName).exe
..\..\3rd\lib;%(AdditionalLibraryDirectories)
true
Console
@@ -153,7 +157,7 @@
4819
- $(OutDir)ahttpserver.exe
+ $(OutDir)$(ProjectName)-$(Platform).exe
..\..\3rd\lib\x64;%(AdditionalLibraryDirectories)
true
Console
diff --git a/server/project/windows/ahttpserver_2013.vcxproj b/server/project/windows/ahttpserver_2013.vcxproj
index d1afcead39a745da7a66ab44c69aa1eebf44f225..2e38f4bfc8c8739c0e60b8accca8eb2cf77ab8af 100755
--- a/server/project/windows/ahttpserver_2013.vcxproj
+++ b/server/project/windows/ahttpserver_2013.vcxproj
@@ -68,16 +68,18 @@
.\Debug\
- ..\..\bin\$(Platform)\
+ ..\..\bin\
.\Debug\
+ $(ProjectName)-$(Platform)
..\..\bin\
.\Release\
- ..\..\bin\$(Platform)\
+ ..\..\bin\
.\Release\
+ $(ProjectName)-$(Platform)
@@ -93,7 +95,7 @@
4819
- $(OutDir)ahttpserver.exe
+ $(OutDir)$(ProjectName).exe
..\..\3rd\lib;%(AdditionalLibraryDirectories)
true
$(OutDir)ahttpserver.pdb
@@ -114,7 +116,7 @@
4819
- $(OutDir)ahttpserver.exe
+ $(OutDir)$(ProjectName)-$(Platform).exe
..\..\3rd\lib\x64;%(AdditionalLibraryDirectories)
true
$(OutDir)ahttpserver.pdb
@@ -132,7 +134,7 @@
4819
- $(OutDir)ahttpserver.exe
+ $(OutDir)$(ProjectName).exe
..\..\3rd\lib;%(AdditionalLibraryDirectories)
true
Console
@@ -152,7 +154,7 @@
4819
- $(OutDir)ahttpserver.exe
+ $(OutDir)$(ProjectName)-$(Platform).exe
..\..\3rd\lib\x64;%(AdditionalLibraryDirectories)
true
Console
diff --git a/server/src/Main.cpp b/server/src/Main.cpp
index 8b88841f1b7766316a0e11fd82b7903b5a7789f6..426f564cdaa641ebaf96c4f398e8d321ee2c6bd4 100755
--- a/server/src/Main.cpp
+++ b/server/src/Main.cpp
@@ -84,7 +84,7 @@ int _tmain(int argc, _TCHAR *argv[])
{
InstancesManager *lpInstancesManager = GetInstancesManager();
- if( lpInstancesManager->Require(STRING_from_string(IN_AsynNetwork), 0) != S_OK )
+ if( lpInstancesManager->Require(STRING_from_string(IN_AsynNetwork)) != S_OK )
{
printf("can't load plugin: %s\n", IN_AsynNetwork);
break;
diff --git a/server/src/Service.cpp b/server/src/Service.cpp
index 5cc896b4e2f2481d2394a4319ade3b5127127e26..4629093aff906a3bf2560e5b56c3ccab0a965b16 100755
--- a/server/src/Service.cpp
+++ b/server/src/Service.cpp
@@ -34,8 +34,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include
BEGIN_ASYN_MESSAGE_MAP(CService)
- ON_IOMSG_NOTIFY(OnIomsgNotify)
- ON_QUERY_RESULT(OnQueryResult, IKeyvalSetter)
+ ON_IOMSG_NOTIFY(OnIomsgNotify)
+ ON_QUERY_RESULT(OnQueryResult, IKeyvalSetter)
END_ASYN_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
HRESULT CService::OnQueryResult( uint64_t lparam1, uint64_t lparam2, IKeyvalSetter **ppKeyval )
@@ -73,205 +73,205 @@ HRESULT CService::OnIomsgNotify( uint64_t lParam1, uint64_t lAction, IAsynIoOper
switch(lAction)
{
- case Io_acceptd:
- {
- if( lErrorCode != NO_ERROR )
+ case Io_acceptd:
{
- printf("accept: %d\n", lErrorCode);
- m_spAsynTcpSocketListener[lParam1? 1 : 0]->Accept(lpAsynIoOperation);
- return S_OK;
- }
- else
- {// 新客户端
- std::string host; asynsdk::CStringSetterRef temp(1, &host);
- PORT port;
-
- CComPtr spAsynIoOperation;
- lpAsynIoOperation->QueryInterface(IID_IAsynNetIoOperation, (void **)&spAsynIoOperation);
- spAsynIoOperation->GetPeerAddress(&temp, 0, &port, 0);
- printf("accepted new client from %s:%d\n", host.c_str(), port);
-
- char skey[64]; sprintf_s(skey, 64, "%s:%d", host.c_str(), port);
- userinfo &info = m_arId2Userinfos[skey];
- info.skey = skey;
-
- //提取连接IAsynTcpSocket
- lpAsynIoOperation->GetCompletedObject(TRUE, IID_INet, (void **)&info.spDataTcpSocket);
- m_spAsynTcpSocketListener[lParam1? 1 : 0]->Accept(lpAsynIoOperation);
-
- //控制连接发送速度: B/s
- m_spInstanceManager->NewInstance(0, 0, IID_ISpeedController, (void **)&info.spSpeedController);
- info.spSpeedController->SetMaxSpeed(m_setsfile.get_long("session", "max_sendspeed", -1));
- bool ret = asynsdk::SetSpeedController(info.spDataTcpSocket, Io_send, -1, info.spSpeedController);
-
- CComPtr spRecvIoOperation;
- m_spAsynFrame->CreateAsynIoOperation(0, 0, &spRecvIoOperation);
- m_arOp2Userinfos[spRecvIoOperation] = &info;
-
- spRecvIoOperation->SetIoParam1(0); //准备接收http报文头部
- return info.spDataTcpSocket->Read(spRecvIoOperation);
+ if( lErrorCode != NO_ERROR )
+ {
+ printf("accept, error: %d\n", lErrorCode);
+ m_spAsynTcpSocketListener[lParam1? 1 : 0]->Accept(lpAsynIoOperation);
+ return S_OK;
+ }
+ else
+ {// 新客户端
+ std::string host; asynsdk::CStringSetterRef temp(1, &host);
+ PORT port;
+
+ CComPtr spAsynIoOperation;
+ lpAsynIoOperation->QueryInterface(IID_IAsynNetIoOperation, (void **)&spAsynIoOperation);
+ spAsynIoOperation->GetPeerAddress(&temp, 0, &port, 0);
+ printf("accepted new client from %s:%d\n", host.c_str(), port);
+
+ char skey[64]; sprintf_s(skey, 64, "%s:%d", host.c_str(), port);
+ userinfo &info = m_arId2Userinfos[skey];
+ info.skey = skey;
+
+ //提取连接IAsynTcpSocket
+ lpAsynIoOperation->GetCompletedObject(TRUE, IID_INet, (void **)&info.spDataTcpSocket);
+ m_spAsynTcpSocketListener[lParam1? 1 : 0]->Accept(lpAsynIoOperation);
+
+ //控制连接发送速度: B/s
+ m_spInstanceManager->NewInstance(0, 0, IID_ISpeedController, (void **)&info.spSpeedController);
+ info.spSpeedController->SetMaxSpeed(m_setsfile.get_long("session", "max_sendspeed", -1));
+ bool ret = asynsdk::SetSpeedController(info.spDataTcpSocket, Io_send, -1, info.spSpeedController);
+
+ CComPtr spRecvIoOperation;
+ m_spAsynFrame->CreateAsynIoOperation(0, 0, &spRecvIoOperation);
+ m_arOp2Userinfos[spRecvIoOperation] = &info;
+
+ spRecvIoOperation->SetIoParam1(0); //准备接收http报文头部
+ return info.spDataTcpSocket->Read(spRecvIoOperation);
+ }
}
- }
-
- case Io_send:
- {
- userinfo *info = m_arOp2Userinfos[lpAsynIoOperation];
- if( lErrorCode != NO_ERROR )
+ case Io_send:
{
- printf("send failture, error: %d\n", lErrorCode);
- }
- else
- {
- uint32_t speed;
- info->spSpeedController->GetPostIoBytes(0, &speed);
- printf("send complete, speed: %.2fKB/s, cost: %dms\n", speed / 1024.0, ::GetTickCount() - info->starttime);
- if( lParam1 != 0/*Keep-Alive*/ ) //长连接的处理
+ userinfo *info = m_arOp2Userinfos[lpAsynIoOperation];
+
+ if( lErrorCode != NO_ERROR )
{
- info->tranfile = NULL;
- lpAsynIoOperation->SetIoParam1(0); //准备接收http报文头部
- return info->spDataTcpSocket->Read(lpAsynIoOperation);
+ printf("send, error: %d\n", lErrorCode);
+ }
+ else
+ {
+ uint32_t speed;
+ info->spSpeedController->GetPostIoBytes(0, &speed);
+ printf("send complete, speed: %.2fKB/s, cost: %dms\n", speed / 1024.0, ::GetTickCount() - info->starttime);
+ if( lParam1 != 0/*Keep-Alive*/ ) //长连接的处理
+ {
+ info->tranfile = NULL;
+ lpAsynIoOperation->SetIoParam1(0); //准备接收http报文头部
+ return info->spDataTcpSocket->Read(lpAsynIoOperation);
+ }
}
- }
-
- printf("remove client: %s\n", info->skey.c_str());
- m_arOp2Userinfos.erase(lpAsynIoOperation);
- m_arId2Userinfos.erase(info->skey);
- break;
- }
- case Io_recv:
- {
- userinfo *info = m_arOp2Userinfos[lpAsynIoOperation];
- if( lErrorCode != NO_ERROR )
- {
- if( lErrorCode != AE_RESET ) printf("recv, error: %d\n", lErrorCode);
printf("remove client: %s\n", info->skey.c_str());
m_arOp2Userinfos.erase(lpAsynIoOperation);
m_arId2Userinfos.erase(info->skey);
break;
}
- else
+
+ case Io_recv:
{
- //接收来自客户端的HTTP请求
- CComPtr spReqmsg;
- lpAsynIoOperation->GetCompletedObject(1, IID_INetmsg, (void **)&spReqmsg);
-
- STRING Method;
- STRING Params;
- STRING V;
- spReqmsg->Getline(&Method, &Params, &V, 0 );
- std::string method = string_from_STRING(Method);
- std::string params = string_from_STRING(Params);
- std::string v = string_from_STRING(V);
-
-#ifdef _DEBUG
- printf("rcv http req packet from %s\n", info->skey.c_str());
- printf("%s %s %s\n", method.c_str(), params.c_str(), v.c_str());
-#endif
-
- asynsdk::CStringSetterRef s(1, ¶ms);
- spReqmsg->Get(STRING_from_string(";value_ansi"), 0, 0, &s); //获取params的CP_ACP编码格式
-
- if( params == "/" ||
- params.empty() ) params = "/index.html";
-
- const std::string &filename = m_setsfile.get_string("website", "home") + params;
- asynsdk::CStringSetter c(1);
- spReqmsg->Get(STRING_from_string("Connection"), 0, 0, c.Clear());
- lpAsynIoOperation->SetOpParams(AF_IOMSG_NOTIFY, 0, Io_send); //设置传输完成通知事件
- lpAsynIoOperation->SetOpParam1(c.m_val != "Keep-Alive" ? 0 : 1);
-
- CComPtr spAsynFile;
- m_spAsynFileSystem->CreateAsynFile(&spAsynFile );
- HRESULT r1 = spAsynFile->Open( m_spAsynFrameThread,
- STRING_from_string(filename),
- GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL);
- if( r1 != S_OK )
+ userinfo *info = m_arOp2Userinfos[lpAsynIoOperation];
+ if( lErrorCode != NO_ERROR )
{
- printf("open %s, error: %d\n", filename.c_str(), ::GetLastError());
- info->spDataTcpSocket->SendPacket(STRING_from_string("404"), STRING_from_string("Not Found"), 0, 0);
- return asynsdk::PostAsynIoOperation(lpAsynIoOperation,404);
+ if( lErrorCode != AE_RESET ) printf("recv, error: %d\n", lErrorCode);
+ printf("remove client: %s\n", info->skey.c_str());
+ m_arOp2Userinfos.erase(lpAsynIoOperation);
+ m_arId2Userinfos.erase(info->skey);
+ break;
}
else
{
- asynsdk::CKeyvalSetter params(1);
-
- std::string::size_type ipos = filename.rfind('.');
- if( std::string::npos != ipos )
+ //接收来自客户端的HTTP请求
+ CComPtr spReqmsg;
+ lpAsynIoOperation->GetCompletedObject(1, IID_INetmsg, (void **)&spReqmsg);
+
+ STRING Method;
+ STRING Params;
+ STRING V;
+ spReqmsg->Getline(&Method, &Params, &V, 0 );
+ std::string method = string_from_STRING(Method);
+ std::string params = string_from_STRING(Params);
+ std::string v = string_from_STRING(V);
+
+ #ifdef _DEBUG
+ printf("rcv http req packet from %s\n", info->skey.c_str());
+ printf("%s %s %s\n", method.c_str(), params.c_str(), v.c_str());
+ #endif
+
+ asynsdk::CStringSetterRef s(1, ¶ms);
+ spReqmsg->Get(STRING_from_string(";value_ansi"), 0, 0, &s); //获取params的CP_ACP编码格式
+
+ if( params == "/" ||
+ params.empty() ) params = "/index.html";
+
+ const std::string &filename = m_setsfile.get_string("website", "home") + params;
+ asynsdk::CStringSetter c(1);
+ spReqmsg->Get(STRING_from_string("Connection"), 0, 0, c.Clear());
+ lpAsynIoOperation->SetOpParams(AF_IOMSG_NOTIFY, 0, Io_send); //设置传输完成通知事件
+ lpAsynIoOperation->SetOpParam1(c.m_val != "Keep-Alive" ? 0 : 1);
+
+ CComPtr spAsynFile;
+ m_spAsynFileSystem->CreateAsynFile(&spAsynFile );
+ HRESULT r1 = spAsynFile->Open( m_spAsynFrameThread,
+ STRING_from_string(filename),
+ GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL);
+ if( r1 != S_OK )
{
- std::map::iterator it = m_mapMimes.find(filename.substr(ipos));
- if( it != m_mapMimes.end()) params.Set(STRING_from_string("Content-type"), 1, STRING_from_string(it->second));
+ printf("open %s, error: %d\n", filename.c_str(), ::GetLastError());
+ info->spDataTcpSocket->SendPacket(STRING_from_string("404"), STRING_from_string("Not Found"), 0, 0);
+ return asynsdk::PostAsynIoOperation(lpAsynIoOperation,404);
}
+ else
+ {
+ asynsdk::CKeyvalSetter params(1);
- uint64_t filesize; spAsynFile->GetFileSize(&filesize );
+ std::string::size_type ipos = filename.rfind('.');
+ if( std::string::npos != ipos )
+ {
+ std::map::iterator it = m_mapMimes.find(filename.substr(ipos));
+ if( it != m_mapMimes.end()) params.Set(STRING_from_string("Content-type"), 1, STRING_from_string(it->second));
+ }
- char out[128];
- uint64_t sendpos = 0;
- uint64_t sendend = filesize - 1;
+ uint64_t filesize; spAsynFile->GetFileSize(&filesize );
- if( spReqmsg->Get(STRING_from_string("Range"), 0, 0, c.Clear()) != S_OK )
- {
- _i64toa_s(filesize, out, sizeof(out), 10);
- params.Set(STRING_from_string("Content-Length"), 1, STRING_from_string(out));
+ char out[128];
+ uint64_t sendpos = 0;
+ uint64_t sendend = filesize - 1;
- info->spDataTcpSocket->SendPacket(STRING_from_string("200"), STRING_from_string("OK"), ¶ms, 0);
- if( filesize == 0 ) //文件大小等于0的情况: 模拟发送完成
+ if( spReqmsg->Get(STRING_from_string("Range"), 0, 0, c.Clear()) != S_OK )
{
- info->starttime = ::GetTickCount();
- return asynsdk::PostAsynIoOperation(lpAsynIoOperation, NO_ERROR);
+ _i64toa_s(filesize, out, sizeof(out), 10);
+ params.Set(STRING_from_string("Content-Length"), 1, STRING_from_string(out));
+
+ info->spDataTcpSocket->SendPacket(STRING_from_string("200"), STRING_from_string("OK"), ¶ms, 0);
+ if( filesize == 0 ) //文件大小等于0的情况: 模拟发送完成
+ {
+ info->starttime = ::GetTickCount();
+ return asynsdk::PostAsynIoOperation(lpAsynIoOperation, NO_ERROR);
+ }
}
- }
- else
- {// Range: bytes=5275648-
- std::string::size_type ipos = c.m_val.find('=');
- if( std::string::npos != ipos )
- {
- sendpos = _atoi64(c.m_val.c_str() + ipos + 1);
- ipos = c.m_val.find('-', ipos);
+ else
+ {// Range: bytes=5275648-
+ std::string::size_type ipos = c.m_val.find('=');
if( std::string::npos != ipos )
{
- ipos = c.m_val.find_first_of("0123456789", ipos);
+ sendpos = _atoi64(c.m_val.c_str() + ipos + 1);
+ ipos = c.m_val.find('-', ipos);
if( std::string::npos != ipos )
{
- sendend = _atoi64(c.m_val.c_str() + ipos);
+ ipos = c.m_val.find_first_of("0123456789", ipos);
+ if( std::string::npos != ipos )
+ {
+ sendend = _atoi64(c.m_val.c_str() + ipos);
+ }
}
}
- }
- if( sendpos > sendend ||
- sendpos >= filesize || sendend >= filesize ) //字段非法
- {
- info->spDataTcpSocket->SendPacket(STRING_from_string("403"), STRING_from_string("Forbidden"), ¶ms, 0);
- return asynsdk::PostAsynIoOperation(lpAsynIoOperation, 403);
- }
+ if( sendpos > sendend ||
+ sendpos >= filesize || sendend >= filesize ) //字段非法
+ {
+ info->spDataTcpSocket->SendPacket(STRING_from_string("403"), STRING_from_string("Forbidden"), ¶ms, 0);
+ return asynsdk::PostAsynIoOperation(lpAsynIoOperation, 403);
+ }
- //Content-Range: bytes 5275648-15143085/15143086
- sprintf_s(out, 128, "bytes %I64d-%I64d/%I64d", sendpos, sendend, filesize);
- params.Set(STRING_from_string("Content-Range" ), 1, STRING_from_string(out));
+ //Content-Range: bytes 5275648-15143085/15143086
+ sprintf_s(out, 128, "bytes %I64d-%I64d/%I64d", sendpos, sendend, filesize);
+ params.Set(STRING_from_string("Content-Range" ), 1, STRING_from_string(out));
- _i64toa_s(sendend + 1 - sendpos, out, sizeof(out), 10);
- params.Set(STRING_from_string("Content-Length"), 1, STRING_from_string(out));
+ _i64toa_s(sendend + 1 - sendpos, out, sizeof(out), 10);
+ params.Set(STRING_from_string("Content-Length"), 1, STRING_from_string(out));
- info->spDataTcpSocket->SendPacket(STRING_from_string("206"), STRING_from_string("Partial Content"), ¶ms, 0);
- }
+ info->spDataTcpSocket->SendPacket(STRING_from_string("206"), STRING_from_string("Partial Content"), ¶ms, 0);
+ }
- CComPtr spAsynIoBridge;
- m_spAsynFrameThread->CreateAsynIoBridge(spAsynFile, info->spDataTcpSocket, 0, &spAsynIoBridge);
- if( sendpos )
- {
- CComPtr spAsynIoOperation; spAsynIoBridge->Get(BT_GetSourceIoOperation, 0, IID_IAsynFileIoOperation, (void**)&spAsynIoOperation);
- spAsynIoOperation->SetPosition(sendpos); //设置开始读取数据时文件的偏移
+ CComPtr spAsynIoBridge;
+ m_spAsynFrameThread->CreateAsynIoBridge(spAsynFile, info->spDataTcpSocket, 0, &spAsynIoBridge);
+ if( sendpos )
+ {
+ CComPtr spAsynIoOperation; spAsynIoBridge->Get(BT_GetSourceIoOperation, 0, IID_IAsynFileIoOperation, (void**)&spAsynIoOperation);
+ spAsynIoOperation->SetPosition(sendpos); //设置开始读取数据时文件的偏移
+ }
+
+ info->tranfile.reset(new CTranfile(spAsynIoBridge, lpAsynIoOperation));
+ printf("start to send %s from %I64d-%I64d/%I64d\n", filename.c_str(), sendpos, sendend, filesize);
+ info->starttime = ::GetTickCount();
+ return info->tranfile->Start(sendend - sendpos + 1);
}
-
- info->tranfile.reset(new CTranfile(spAsynIoBridge, lpAsynIoOperation));
- printf("start to send %s from %I64d-%I64d/%I64d\n", filename.c_str(), sendpos, sendend, filesize);
- info->starttime = ::GetTickCount();
- return info->tranfile->Start(sendend - sendpos + 1);
}
}
}
- }
return E_NOTIMPL; //通知系统释放lpAsynIoOperation
}
diff --git a/server/src/Service.h b/server/src/Service.h
index 46d78e3d4887d023384fe10c852078896d3a63da..b1615c5be538738ef5173faa70174e1304b0debf 100755
--- a/server/src/Service.h
+++ b/server/src/Service.h
@@ -87,13 +87,14 @@ public: // interface of asyn_message_events_impl
public:
bool Start()
{
- m_spInstanceManager->Require(STRING_from_string(IN_AsynFileSystem), 0);
- if( m_spInstanceManager->GetInstance(STRING_from_string(IN_AsynFileSystem), IID_IAsynFileSystem, (void **)&m_spAsynFileSystem) != S_OK )
+ if( m_spInstanceManager->Require(STRING_from_string(IN_AsynFileSystem)) != S_OK )
{
printf("can't load plugin: %s\n", IN_AsynFileSystem);
return false;
}
+ m_spInstanceManager->GetInstance(STRING_from_string(IN_AsynFileSystem), IID_IAsynFileSystem, (void **)&m_spAsynFileSystem);
+
//设置全局发送速度: IAsynNetwork, B/s
CComPtr spGlobalSpeedController;
CComPtr spObjectHolder;
@@ -106,7 +107,8 @@ public:
if( m_setsfile.is_exist("ssl", "cert"))
{// for ssl
- FILE *f = 0; fopen_s(&f, m_setsfile.get_string("ssl", "cert").c_str(), "rb");
+ const std::string &file = m_setsfile.get_string("ssl", "cert");
+ FILE *f = 0; errno_t hr = fopen_s(&f, file.c_str(), "rb");
if( f )
{
BYTE temp[4096];
@@ -118,6 +120,10 @@ public:
m_password = m_setsfile.get_string("ssl", "password");
}
}
+ else
+ {
+ printf("open cert.p12[%s], error: %d\n", file.c_str(), (int)hr);
+ }
}
CComPtr threadpool;
@@ -153,14 +159,9 @@ public:
}
PORT sslport = (PORT)m_setsfile.get_long("ssl", "port");
- if( sslport )
+ if(!m_cert_p12.empty() &&
+ sslport )
{// check [ssl]
- if( m_cert_p12.empty())
- {
- printf("not find p12[cert]\n");
- return false;
- }
-
CComPtr spAsynInnSocketListener;
m_spAsynNetwork->CreateAsynTcpSocketListener(STRING_EX::null, &spAsynInnSocketListener);
diff --git a/server/src/web.h b/server/src/web.h
index aed5f3f285e092a35b445b0144f74f5d8ccb20fa..d60a658ef946c4ffea7417607cc7996c38fbfcfe 100755
--- a/server/src/web.h
+++ b/server/src/web.h
@@ -56,15 +56,15 @@ public:
if( watch == 0 ) return true; //不要监控目录
if( watch == 1 ) CreateFilelist("/"); //自动创建索引目录
- lpInstancesManager->Require(STRING_from_string(IN_AsynFileSystem), 0);
- CComPtr spAsynFileSystem;
- lpInstancesManager->GetInstance(STRING_from_string(IN_AsynFileSystem), IID_IAsynFileSystem, (void **)&spAsynFileSystem);
- if( spAsynFileSystem == NULL )
+ if( lpInstancesManager->Require(STRING_from_string(IN_AsynFileSystem)) != S_OK )
{
printf("can't load plugin: %s\n", IN_AsynFileSystem);
return false;
}
+ CComPtr spAsynFileSystem;
+ lpInstancesManager->GetInstance(STRING_from_string(IN_AsynFileSystem), IID_IAsynFileSystem, (void **)&spAsynFileSystem);
+
HRESULT r1 = spAsynFileSystem->CreateAsynFileWatcher(m_spAsynFrameThread, STRING_from_string(m_filepath), TRUE, FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME, &m_spAsynFileWatcher);
if( r1 != S_OK )
{