mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Merge pull request #148 from NNemec/master
Various small changes of general interest
This commit is contained in:
@@ -31,8 +31,7 @@
|
||||
#ifndef __STDC_LIMIT_MACROS
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#endif
|
||||
//#include <stdint.h>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <stdint.h>
|
||||
|
||||
// SIZE_MAX appears to be a compiler thing not an OS header thing.
|
||||
// make sure it is defined.
|
||||
|
||||
@@ -136,7 +136,7 @@ private:
|
||||
static const uint8_t STATE_WRITE = 4;
|
||||
|
||||
uint8_t m_state;
|
||||
uint64_t m_bytes_needed;
|
||||
std::streamsize m_bytes_needed;
|
||||
uint64_t m_payload_size;
|
||||
char m_header[MAX_HEADER_LENGTH];
|
||||
};
|
||||
|
||||
@@ -79,9 +79,7 @@ public:
|
||||
// TODO: decide if it is best to silently fail here or produce some sort
|
||||
// of warning or exception.
|
||||
const std::string& key3 = request.header("Sec-WebSocket-Key3");
|
||||
std::copy(key3.c_str(),
|
||||
key3.c_str()+std::min(static_cast<size_t>(8), key3.size()),
|
||||
&key_final[8]);
|
||||
memcpy(&key_final[8],key3.c_str(),std::min(static_cast<size_t>(8), key3.size()));
|
||||
|
||||
m_key3 = md5_hash_string(std::string(key_final,16));
|
||||
|
||||
@@ -331,11 +329,9 @@ private:
|
||||
num = atoi(digits.c_str());
|
||||
if (spaces > 0 && num > 0) {
|
||||
num = htonl(num/spaces);
|
||||
std::copy(reinterpret_cast<char*>(&num),
|
||||
reinterpret_cast<char*>(&num)+4,
|
||||
result);
|
||||
memcpy(result,&num,4);
|
||||
} else {
|
||||
std::fill(result,result+4,0);
|
||||
memset(result,0,4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -201,18 +201,40 @@ public:
|
||||
m_state(IDLE),
|
||||
m_timer(m,boost::posix_time::seconds(0)) {}
|
||||
|
||||
void listen(uint16_t port, size_t n = 1);
|
||||
void listen(const boost::asio::ip::tcp::endpoint& e, size_t num_threads = 1);
|
||||
void start_listen(uint16_t port, size_t num_threads = 1);
|
||||
void start_listen(const boost::asio::ip::tcp::endpoint& e, size_t num_threads = 1);
|
||||
// uses internal resolver
|
||||
void listen(const std::string &host, const std::string &service, size_t n = 1);
|
||||
void start_listen(const std::string &host, const std::string &service, size_t num_threads = 1);
|
||||
|
||||
template <typename InternetProtocol>
|
||||
void listen(const InternetProtocol &internet_protocol, uint16_t port, size_t n = 1) {
|
||||
void start_listen(const InternetProtocol &internet_protocol, uint16_t port, size_t num_threads = 1) {
|
||||
m_endpoint.m_alog->at(log::alevel::DEVEL)
|
||||
<< "role::server listening on port " << port << log::endl;
|
||||
boost::asio::ip::tcp::endpoint e(internet_protocol, port);
|
||||
listen(e,n);
|
||||
start_listen(e,num_threads);
|
||||
}
|
||||
|
||||
void stop_listen(bool join);
|
||||
|
||||
// legacy interface
|
||||
void listen(uint16_t port, size_t num_threads = 1) {
|
||||
start_listen(port,num_threads>1 ? num_threads : 0);
|
||||
if(num_threads > 1) stop_listen(true);
|
||||
}
|
||||
void listen(const boost::asio::ip::tcp::endpoint& e, size_t num_threads = 1) {
|
||||
start_listen(e,num_threads>1 ? num_threads : 0);
|
||||
if(num_threads > 1) stop_listen(true);
|
||||
}
|
||||
void listen(const std::string &host, const std::string &service, size_t num_threads = 1) {
|
||||
start_listen(host,service,num_threads>1 ? num_threads : 0);
|
||||
if(num_threads > 1) stop_listen(true);
|
||||
}
|
||||
template <typename InternetProtocol>
|
||||
void listen(const InternetProtocol &internet_protocol, uint16_t port, size_t num_threads = 1) {
|
||||
start_listen(internet_protocol,port,num_threads>1 ? num_threads : 0);
|
||||
if(num_threads > 1) stop_listen(true);
|
||||
}
|
||||
|
||||
protected:
|
||||
bool is_server() {
|
||||
return true;
|
||||
@@ -240,10 +262,12 @@ private:
|
||||
state m_state;
|
||||
|
||||
boost::asio::deadline_timer m_timer;
|
||||
|
||||
std::vector< boost::shared_ptr<boost::thread> > m_listening_threads;
|
||||
};
|
||||
|
||||
template <class endpoint>
|
||||
void server<endpoint>::listen(const boost::asio::ip::tcp::endpoint& e,size_t num_threads) {
|
||||
void server<endpoint>::start_listen(const boost::asio::ip::tcp::endpoint& e,size_t num_threads) {
|
||||
{
|
||||
boost::unique_lock<boost::recursive_mutex> lock(m_endpoint.m_lock);
|
||||
|
||||
@@ -259,38 +283,55 @@ void server<endpoint>::listen(const boost::asio::ip::tcp::endpoint& e,size_t num
|
||||
this->start_accept();
|
||||
}
|
||||
|
||||
if (num_threads == 1) {
|
||||
m_endpoint.run_internal();
|
||||
} else if (num_threads > 1 && num_threads <= MAX_THREAD_POOL_SIZE) {
|
||||
std::vector< boost::shared_ptr<boost::thread> > threads;
|
||||
|
||||
for (std::size_t i = 0; i < num_threads; ++i) {
|
||||
boost::shared_ptr<boost::thread> thread(
|
||||
new boost::thread(boost::bind(
|
||||
&endpoint_type::run_internal,
|
||||
&m_endpoint
|
||||
))
|
||||
);
|
||||
threads.push_back(thread);
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < threads.size(); ++i) {
|
||||
threads[i]->join();
|
||||
}
|
||||
} else {
|
||||
if (num_threads < 0 || num_threads > MAX_THREAD_POOL_SIZE) {
|
||||
throw exception("listen called with invalid num_threads value");
|
||||
}
|
||||
|
||||
m_state = LISTENING;
|
||||
|
||||
for (std::size_t i = 0; i < num_threads; ++i) {
|
||||
boost::shared_ptr<boost::thread> thread(
|
||||
new boost::thread(boost::bind(
|
||||
&endpoint_type::run_internal,
|
||||
&m_endpoint
|
||||
))
|
||||
);
|
||||
m_listening_threads.push_back(thread);
|
||||
}
|
||||
|
||||
if(num_threads == 0)
|
||||
{
|
||||
m_endpoint.run_internal();
|
||||
m_state = IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
// server<endpoint> Implimentation
|
||||
// TODO: provide a way to stop/reset the server endpoint
|
||||
template <class endpoint>
|
||||
void server<endpoint>::listen(uint16_t port, size_t n) {
|
||||
listen(boost::asio::ip::tcp::v6(), port, n);
|
||||
void server<endpoint>::stop_listen(bool join) {
|
||||
if (m_state != LISTENING) {
|
||||
throw exception("stop_listen called from invalid state");
|
||||
}
|
||||
|
||||
m_state = STOPPING;
|
||||
|
||||
if(join) {
|
||||
for (std::size_t i = 0; i < m_listening_threads.size(); ++i) {
|
||||
m_listening_threads[i]->join();
|
||||
}
|
||||
}
|
||||
|
||||
m_listening_threads.clear();
|
||||
|
||||
m_state = IDLE;
|
||||
}
|
||||
|
||||
template <class endpoint>
|
||||
void server<endpoint>::listen(const std::string &host, const std::string &service, size_t n) {
|
||||
void server<endpoint>::start_listen(uint16_t port, size_t num_threads) {
|
||||
start_listen(boost::asio::ip::tcp::v6(), port, num_threads);
|
||||
}
|
||||
|
||||
template <class endpoint>
|
||||
void server<endpoint>::start_listen(const std::string &host, const std::string &service, size_t num_threads) {
|
||||
boost::asio::ip::tcp::resolver resolver(m_io_service);
|
||||
boost::asio::ip::tcp::resolver::query query(host, service);
|
||||
boost::asio::ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
|
||||
@@ -299,7 +340,7 @@ void server<endpoint>::listen(const std::string &host, const std::string &servic
|
||||
throw std::invalid_argument("Can't resolve host/service to listen");
|
||||
}
|
||||
const boost::asio::ip::tcp::endpoint &ep = *endpoint_iterator;
|
||||
listen(ep,n);
|
||||
start_listen(ep,num_threads);
|
||||
}
|
||||
|
||||
template <class endpoint>
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Disable "warning C4355: 'this' : used in base member initializer list".
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4355)
|
||||
#endif
|
||||
|
||||
namespace websocketpp {
|
||||
namespace socket {
|
||||
|
||||
@@ -116,4 +122,8 @@ private:
|
||||
} // namespace socket
|
||||
} // namespace websocketpp
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // WEBSOCKETPP_SOCKET_PLAIN_HPP
|
||||
|
||||
15
windows/vcpp2008/common.vsprops
Normal file
15
windows/vcpp2008/common.vsprops
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="common"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\..\boost_1_47_0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="..\..\..\..\boost_1_47_0\stage\lib"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
@@ -21,6 +21,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
@@ -41,7 +42,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\boost_1_47_0;.."
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;NOCOMM;_WIN32_WINNT=0x0600"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -62,7 +63,6 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\..\boost_1_47_0\stage\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
@@ -94,6 +94,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
@@ -138,7 +139,6 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\..\boost_1_47_0\stage\lib"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
@@ -41,7 +42,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\boost_1_47_0;.."
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;NOCOMM;_WIN32_WINNT=0x0600"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -62,7 +63,6 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\..\boost_1_47_0\stage\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
@@ -94,6 +94,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
@@ -116,7 +117,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="..\..\..\..\boost_1_47_0;.."
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;NOCOMM;_WIN32_WINNT=0x0600"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
@@ -138,7 +139,6 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\..\boost_1_47_0\stage\lib"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
|
||||
189
windows/vcpp2008/examples/concurrent_server.vcproj
Normal file
189
windows/vcpp2008/examples/concurrent_server.vcproj
Normal file
@@ -0,0 +1,189 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="concurrent_server"
|
||||
ProjectGUID="{F633A1F7-8FE5-408B-924F-4A3CAEF172C1}"
|
||||
RootNamespace="examples"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;NOCOMM;_WIN32_WINNT=0x0600"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="0"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
IgnoreDefaultLibraryNames="LIBCMT.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;NOCOMM;_WIN32_WINNT=0x0600"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\examples\concurrent_server\concurrent_server.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -21,6 +21,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
@@ -41,7 +42,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\boost_1_47_0;.."
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;NOCOMM;_WIN32_WINNT=0x0600"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -63,7 +64,6 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\..\boost_1_47_0\stage\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
@@ -95,6 +95,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
@@ -117,7 +118,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="..\..\..\..\boost_1_47_0;.."
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;NOCOMM;_WIN32_WINNT=0x0600"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
@@ -139,7 +140,6 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\..\boost_1_47_0\stage\lib"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
@@ -177,25 +177,11 @@
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\examples\echo_server\echo.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\examples\echo_server\echo_server.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\examples\echo_server\echo.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
||||
@@ -20,6 +20,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chatclient", "examples\chat
|
||||
{1C0FD04E-5ACA-4031-B3D1-320A5360C9D0} = {1C0FD04E-5ACA-4031-B3D1-320A5360C9D0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "concurrent_server", "examples\concurrent_server.vcproj", "{F633A1F7-8FE5-408B-924F-4A3CAEF172C1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1C0FD04E-5ACA-4031-B3D1-320A5360C9D0} = {1C0FD04E-5ACA-4031-B3D1-320A5360C9D0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -42,6 +47,10 @@ Global
|
||||
{116BFEDA-AF8E-4B3F-8508-ACC5EE89F905}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{116BFEDA-AF8E-4B3F-8508-ACC5EE89F905}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{116BFEDA-AF8E-4B3F-8508-ACC5EE89F905}.Release|Win32.Build.0 = Release|Win32
|
||||
{F633A1F7-8FE5-408B-924F-4A3CAEF172C1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F633A1F7-8FE5-408B-924F-4A3CAEF172C1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F633A1F7-8FE5-408B-924F-4A3CAEF172C1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F633A1F7-8FE5-408B-924F-4A3CAEF172C1}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -50,5 +59,6 @@ Global
|
||||
{B569A272-D7D3-404B-B5FB-9187C0EB9F48} = {14E490FC-930E-40EE-B14A-84E2D98DEC9F}
|
||||
{2AFECE48-86DE-47D0-9263-DC0D203AA62D} = {14E490FC-930E-40EE-B14A-84E2D98DEC9F}
|
||||
{116BFEDA-AF8E-4B3F-8508-ACC5EE89F905} = {14E490FC-930E-40EE-B14A-84E2D98DEC9F}
|
||||
{F633A1F7-8FE5-408B-924F-4A3CAEF172C1} = {14E490FC-930E-40EE-B14A-84E2D98DEC9F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets=".\common.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
@@ -41,7 +42,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\boost_1_47_0;."
|
||||
AdditionalIncludeDirectories="."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;WIN32_LEAN_AND_MEAN;NOCOMM;_WIN32_WINNT=0x0600"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -84,6 +85,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets=".\common.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
@@ -107,7 +109,7 @@
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="..\..\..\boost_1_47_0;."
|
||||
AdditionalIncludeDirectories="."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;WIN32_LEAN_AND_MEAN;NOCOMM;_WIN32_WINNT=0x0600"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
@@ -159,27 +161,7 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_client.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_client_session.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_frame.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_server.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_server_session.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_session.cpp"
|
||||
RelativePath="..\..\src\uri.cpp"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
@@ -198,44 +180,80 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="md5"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\md5\md5.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="messages"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\messages\data.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="processors"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\processors\hybi_header.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\processors\hybi_util.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="rng"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\rng\blank_rng.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\rng\boost_rng.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\common.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\connection.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\endpoint.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\network_utilities.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_client.hpp"
|
||||
RelativePath="..\..\src\shared_const_buffer.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_client_session.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_connection_handler.hpp"
|
||||
RelativePath="..\..\src\uri.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_frame.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_server.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_server_session.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocket_session.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\websocketpp.hpp"
|
||||
>
|
||||
@@ -249,7 +267,7 @@
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="sha"
|
||||
Name="sha1"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\sha1\sha1.h"
|
||||
@@ -264,6 +282,114 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="processors"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\processors\hybi.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\processors\hybi_header.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\processors\hybi_legacy.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\processors\hybi_util.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\processors\processor.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="http"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\http\constants.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\http\parser.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="logger"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\logger\logger.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="md5"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\md5\md5.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\md5\md5.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="messages"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\messages\control.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\messages\data.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="rng"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\rng\blank_rng.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\rng\boost_rng.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="roles"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\roles\client.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\roles\server.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="sockets"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\sockets\plain.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\sockets\socket_base.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\sockets\tls.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
||||
Reference in New Issue
Block a user