fix windows build (#29)

* fix windows build

* fix for Unix

* Fix build if TLS is OFF

* add OpenSSL req to ws

* Fix build on Mac

* fix tests for windows
This commit is contained in:
Dimon4eg
2019-04-16 18:51:57 +03:00
committed by Benjamin Sergeant
parent d4b0839328
commit 401fc39879
12 changed files with 80 additions and 40 deletions

View File

@ -11,7 +11,6 @@
#include <string>
#include <map>
#include <memory>
#include <algorithm>
namespace ix
{
@ -22,19 +21,10 @@ namespace ix
// Case Insensitive compare_less binary function
struct NocaseCompare
{
bool operator() (const unsigned char& c1, const unsigned char& c2) const
{
return std::tolower(c1) < std::tolower(c2);
}
bool operator() (const unsigned char& c1, const unsigned char& c2) const;
};
bool operator() (const std::string & s1, const std::string & s2) const
{
return std::lexicographical_compare
(s1.begin(), s1.end(), // source range
s2.begin(), s2.end(), // dest range
NocaseCompare()); // comparison
}
bool operator() (const std::string & s1, const std::string & s2) const;
};
using WebSocketHttpHeaders = std::map<std::string, std::string, CaseInsensitiveLess>;