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

@ -6,12 +6,20 @@
#include "IXSocketFactory.h"
#if defined(__APPLE__) or defined(__linux__)
#ifdef IXWEBSOCKET_USE_TLS
# ifdef __APPLE__
# include <ixwebsocket/IXSocketAppleSSL.h>
# elif defined(_WIN32)
# include <ixwebsocket/IXSocketSChannel.h>
# else
# include <ixwebsocket/IXSocketOpenSSL.h>
# endif
#else
#include <ixwebsocket/IXSocket.h>
#endif
namespace ix
@ -31,6 +39,8 @@ namespace ix
#ifdef IXWEBSOCKET_USE_TLS
# ifdef __APPLE__
socket = std::make_shared<SocketAppleSSL>();
# elif defined(_WIN32)
socket = std::make_shared<SocketSChannel>();
# else
socket = std::make_shared<SocketOpenSSL>();
# endif