compile in C++11 mode
This commit is contained in:
parent
b0b451d2c7
commit
02810f9adf
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "IXSelectInterruptFactory.h"
|
#include "IXSelectInterruptFactory.h"
|
||||||
|
|
||||||
|
#include "IXUniquePtr.h"
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
#if defined(__linux__) || defined(__APPLE__)
|
||||||
#include "IXSelectInterruptPipe.h"
|
#include "IXSelectInterruptPipe.h"
|
||||||
#else
|
#else
|
||||||
@ -17,9 +18,9 @@ namespace ix
|
|||||||
SelectInterruptPtr createSelectInterrupt()
|
SelectInterruptPtr createSelectInterrupt()
|
||||||
{
|
{
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
#if defined(__linux__) || defined(__APPLE__)
|
||||||
return std::make_unique<SelectInterruptPipe>();
|
return ix::make_unique<SelectInterruptPipe>();
|
||||||
#else
|
#else
|
||||||
return std::make_unique<SelectInterrupt>();
|
return ix::make_unique<SelectInterrupt>();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} // namespace ix
|
} // namespace ix
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "IXNetSystem.h"
|
#include "IXNetSystem.h"
|
||||||
#include "IXSelectInterrupt.h"
|
#include "IXSelectInterrupt.h"
|
||||||
#include "IXSocket.h"
|
#include "IXSocket.h"
|
||||||
|
#include "IXUniquePtr.h"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -65,7 +66,7 @@ namespace ix
|
|||||||
|
|
||||||
int timeoutMs = 10;
|
int timeoutMs = 10;
|
||||||
bool readyToRead = false;
|
bool readyToRead = false;
|
||||||
auto selectInterrupt = std::make_unique<SelectInterrupt>();
|
auto selectInterrupt = ix::make_unique<SelectInterrupt>();
|
||||||
PollResultType pollResult = Socket::poll(readyToRead, timeoutMs, fd, selectInterrupt);
|
PollResultType pollResult = Socket::poll(readyToRead, timeoutMs, fd, selectInterrupt);
|
||||||
|
|
||||||
if (pollResult == PollResultType::Timeout)
|
if (pollResult == PollResultType::Timeout)
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "IXSocketFactory.h"
|
#include "IXSocketFactory.h"
|
||||||
|
#include "IXUniquePtr.h"
|
||||||
|
|
||||||
#ifdef IXWEBSOCKET_USE_TLS
|
#ifdef IXWEBSOCKET_USE_TLS
|
||||||
|
|
||||||
@ -35,17 +36,17 @@ namespace ix
|
|||||||
|
|
||||||
if (!tls)
|
if (!tls)
|
||||||
{
|
{
|
||||||
socket = std::make_unique<Socket>(fd);
|
socket = ix::make_unique<Socket>(fd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef IXWEBSOCKET_USE_TLS
|
#ifdef IXWEBSOCKET_USE_TLS
|
||||||
#if defined(IXWEBSOCKET_USE_MBED_TLS)
|
#if defined(IXWEBSOCKET_USE_MBED_TLS)
|
||||||
socket = std::make_unique<SocketMbedTLS>(tlsOptions, fd);
|
socket = ix::make_unique<SocketMbedTLS>(tlsOptions, fd);
|
||||||
#elif defined(IXWEBSOCKET_USE_OPEN_SSL)
|
#elif defined(IXWEBSOCKET_USE_OPEN_SSL)
|
||||||
socket = std::make_unique<SocketOpenSSL>(tlsOptions, fd);
|
socket = ix::make_unique<SocketOpenSSL>(tlsOptions, fd);
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
socket = std::make_unique<SocketAppleSSL>(tlsOptions, fd);
|
socket = ix::make_unique<SocketAppleSSL>(tlsOptions, fd);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
errorMsg = "TLS support is not enabled on this platform.";
|
errorMsg = "TLS support is not enabled on this platform.";
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "IXSocket.h"
|
#include "IXSocket.h"
|
||||||
#include "IXSocketConnect.h"
|
#include "IXSocketConnect.h"
|
||||||
#include "IXSocketFactory.h"
|
#include "IXSocketFactory.h"
|
||||||
|
#include "IXUniquePtr.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -258,7 +259,7 @@ namespace ix
|
|||||||
// Use poll to check whether a new connection is in progress
|
// Use poll to check whether a new connection is in progress
|
||||||
int timeoutMs = 10;
|
int timeoutMs = 10;
|
||||||
bool readyToRead = true;
|
bool readyToRead = true;
|
||||||
auto selectInterrupt = std::make_unique<SelectInterrupt>();
|
auto selectInterrupt = ix::make_unique<SelectInterrupt>();
|
||||||
PollResultType pollResult =
|
PollResultType pollResult =
|
||||||
Socket::poll(readyToRead, timeoutMs, _serverFd, selectInterrupt);
|
Socket::poll(readyToRead, timeoutMs, _serverFd, selectInterrupt);
|
||||||
|
|
||||||
|
24
makefile
24
makefile
@ -170,7 +170,7 @@ autobahn_report:
|
|||||||
cp -rvf ~/sandbox/reports/clients/* ../bsergean.github.io/IXWebSocket/autobahn/
|
cp -rvf ~/sandbox/reports/clients/* ../bsergean.github.io/IXWebSocket/autobahn/
|
||||||
|
|
||||||
httpd:
|
httpd:
|
||||||
clang++ --std=c++14 --stdlib=libc++ httpd.cpp \
|
clang++ --std=c++11 --stdlib=libc++ httpd.cpp \
|
||||||
ixwebsocket/IXSelectInterruptFactory.cpp \
|
ixwebsocket/IXSelectInterruptFactory.cpp \
|
||||||
ixwebsocket/IXCancellationRequest.cpp \
|
ixwebsocket/IXCancellationRequest.cpp \
|
||||||
ixwebsocket/IXSocketTLSOptions.cpp \
|
ixwebsocket/IXSocketTLSOptions.cpp \
|
||||||
@ -191,6 +191,28 @@ httpd:
|
|||||||
ixwebsocket/IXSelectInterrupt.cpp \
|
ixwebsocket/IXSelectInterrupt.cpp \
|
||||||
ixwebsocket/apple/IXSetThreadName_apple.cpp -lz
|
ixwebsocket/apple/IXSetThreadName_apple.cpp -lz
|
||||||
|
|
||||||
|
httpd_linux:
|
||||||
|
g++ --std=c++11 httpd.cpp \
|
||||||
|
ixwebsocket/IXSelectInterruptFactory.cpp \
|
||||||
|
ixwebsocket/IXCancellationRequest.cpp \
|
||||||
|
ixwebsocket/IXSocketTLSOptions.cpp \
|
||||||
|
ixwebsocket/IXUserAgent.cpp \
|
||||||
|
ixwebsocket/IXDNSLookup.cpp \
|
||||||
|
ixwebsocket/IXBench.cpp \
|
||||||
|
ixwebsocket/IXWebSocketHttpHeaders.cpp \
|
||||||
|
ixwebsocket/IXSelectInterruptPipe.cpp \
|
||||||
|
ixwebsocket/IXHttp.cpp \
|
||||||
|
ixwebsocket/IXSocketConnect.cpp \
|
||||||
|
ixwebsocket/IXSocket.cpp \
|
||||||
|
ixwebsocket/IXSocketServer.cpp \
|
||||||
|
ixwebsocket/IXNetSystem.cpp \
|
||||||
|
ixwebsocket/IXHttpServer.cpp \
|
||||||
|
ixwebsocket/IXSocketFactory.cpp \
|
||||||
|
ixwebsocket/IXConnectionState.cpp \
|
||||||
|
ixwebsocket/IXUrlParser.cpp \
|
||||||
|
ixwebsocket/IXSelectInterrupt.cpp \
|
||||||
|
ixwebsocket/apple/IXSetThreadName_linux.cpp -lz
|
||||||
|
|
||||||
# For the fork that is configured with appveyor
|
# For the fork that is configured with appveyor
|
||||||
rebase_upstream:
|
rebase_upstream:
|
||||||
git fetch upstream
|
git fetch upstream
|
||||||
|
Loading…
x
Reference in New Issue
Block a user