Skip to content

Commit 6d61cee

Browse files
committed
Merge branch 'development' of https://git01.codeplex.com/casablanca into development
2 parents 058eb39 + 3c08376 commit 6d61cee

File tree

251 files changed

+37876
-159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+37876
-159
lines changed

Build/Common.Build.settings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
<CasablancaSrcDir>$(BuildRoot)\Release\src</CasablancaSrcDir>
4040
<CasablancaResourceDir>$(BuildRoot)\Release\Resource</CasablancaResourceDir>
4141
<CasablancaIncludeDir>$(BuildRoot)\Release\include</CasablancaIncludeDir>
42+
<WebsocketppIncludeDir>$(BuildRoot)\Release\libs\websocketpp</WebsocketppIncludeDir>
43+
<PackagesRoot Condition="'$(PackagesRoot)'=='' AND Exists('$(BuildRoot)\packages')">$(BuildRoot)\packages</PackagesRoot>
44+
<PackagesRoot Condition="'$(PackagesRoot)'=='' AND Exists('$(BuildRoot)\..\Tools\packages')">$(BuildRoot)\..\Tools\packages</PackagesRoot>
4245
<CollateralsDir>$(BuildRoot)\Release\Collateral</CollateralsDir>
4346
<PocoRoot Condition="'$(PocoRoot)'=='' AND Exists('$(BuildRoot)\..\Tools\poco\poco$(DevToolsVersion)')">$(BuildRoot)\..\Tools\poco\poco$(DevToolsVersion)</PocoRoot>
4447
</PropertyGroup>

Release/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if(IOS)
2424

2525
set(BUILD_SHARED_LIBS OFF)
2626
elseif(UNIX) # This includes OSX
27-
find_package(Boost COMPONENTS system thread locale regex filesystem REQUIRED)
27+
find_package(Boost REQUIRED COMPONENTS random system thread locale regex filesystem)
2828
find_package(Threads REQUIRED)
2929
find_package(OpenSSL REQUIRED)
3030

@@ -80,7 +80,8 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
8080

8181
# These settings can be used by the test targets
8282
set(Casablanca_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
83-
set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include ${Boost_INCLUDE_DIR})
83+
set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include ${Boost_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libs/websocketpp)
84+
8485
set(Casablanca_LIBRARY ${LIB}cpprest)
8586
set(Casablanca_LIBRARIES ${Casablanca_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK})
8687

Release/include/cpprest/interopstream.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ namespace Concurrency { namespace streams {
8787
/// </summary>
8888
virtual ~basic_stdio_buffer()
8989
{
90-
if( this->can_read() || this->can_write() ) {
91-
this->close().wait();
92-
}
90+
this->_close_read();
91+
this->_close_write();
9392
}
9493

9594
private:

Release/include/cpprest/rawptrstream.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
****/
2828
#pragma once
2929

30-
#ifndef _CASA_RAWPTR_STREAMS_
31-
#define _CASA_RAWPTR_STREAMS_
30+
#ifndef _CASA_RAWPTR_STREAMS_H
31+
#define _CASA_RAWPTR_STREAMS_H
3232

3333
#include <vector>
3434
#include <queue>

Release/include/cpprest/ws_client.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
****/
2525

2626
#pragma once
27-
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
2827

2928
#ifndef _CASA_WS_CLIENT_H
3029
#define _CASA_WS_CLIENT_H
3130

31+
#if defined(__cplusplus_winrt) || !defined(_M_ARM)
32+
3233
#include <memory>
3334
#include <limits>
3435
#include <condition_variable>
@@ -205,6 +206,7 @@ class websocket_exception : public std::exception
205206
namespace details
206207
{
207208
class winrt_client;
209+
class ws_desktop_client;
208210

209211
// Interface to be implemented by the websocket client implementations.
210212
class _websocket_client_impl
@@ -381,6 +383,5 @@ class websocket_client
381383

382384
}}}}
383385

386+
#endif
384387
#endif /* _CASA_WS_CLIENT_H */
385-
386-
#endif /* WINAPI_FAMILY == WINAPI_FAMILY_APP */

Release/include/cpprest/ws_msg.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@
2323
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2424
****/
2525
#pragma once
26-
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
2726

2827
#ifndef _CASA_WS_MSG_H
2928
#define _CASA_WS_MSG_H
3029

30+
#if defined(__cplusplus_winrt) || !defined(_M_ARM)
31+
3132
#include <memory>
3233
#include <limits>
3334

3435
#include "cpprest/xxpublic.h"
36+
#include "cpprest/containerstream.h"
3537

3638
#if defined(_MSC_VER) && (_MSC_VER >= 1800)
3739
#include <ppltasks.h>
@@ -56,6 +58,7 @@ namespace client
5658
namespace details
5759
{
5860
class winrt_client;
61+
class ws_desktop_client;
5962
}
6063

6164

@@ -97,7 +100,7 @@ class _websocket_message
97100

98101
void set_length(size_t len) { m_length = len; }
99102

100-
size_t length() { return m_length; }
103+
size_t length() { return m_length; }
101104

102105
websocket_message_type message_type() { return m_msg_type; }
103106

@@ -190,6 +193,7 @@ class websocket_outgoing_message
190193
private:
191194

192195
friend class details::winrt_client;
196+
friend class details::ws_desktop_client;
193197

194198
std::shared_ptr<details::_websocket_message> _m_impl;
195199

@@ -257,11 +261,12 @@ class websocket_incoming_message
257261

258262
private:
259263
friend class details::winrt_client;
264+
friend class details::ws_desktop_client;
260265
std::shared_ptr<details::_websocket_message> _m_impl;
261266
};
262267

263268
}}}}
264269

265-
#endif /* _CASA_WS_MSG_H */
270+
#endif
266271

267-
#endif /* WINAPI_FAMILY == WINAPI_FAMILY_APP */
272+
#endif /* _CASA_WS_MSG_H */
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Lineendings
2+
*.sln eol=crlf
3+
*.vcproj eol=crlf
4+
*.vcxproj* eol=crlf
5+
6+
# Whitespace rules
7+
# strict (no trailing, no tabs)
8+
*.cpp whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
9+
*.hpp whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
10+
*.c whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
11+
*.h whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
12+
13+
# normal (no trailing)
14+
*.sql whitespace=trailing-space,space-before-tab,cr-at-eol
15+
*.txt whitespace=trailing-space,space-before-tab,cr-at-eol
16+
17+
# special files which must ignore whitespace
18+
*.patch whitespace=-trailing-space

Release/libs/websocketpp/.gitignore

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# make .git* files visible to git
2+
!.gitignore
3+
!.gitattributes
4+
5+
.DS_Store
6+
7+
#vim stuff
8+
*~
9+
*.swp
10+
11+
*.o
12+
*.so
13+
*.so.?
14+
*.so.?.?.?
15+
*.a
16+
*.dylib
17+
lib/*
18+
19+
# CMake
20+
*.cmake
21+
*.dir
22+
CMakeFiles
23+
INSTALL.*
24+
ZERO_CHECK.*
25+
CMakeCache.txt
26+
install_manifest.txt
27+
28+
# Windows/Visual Studio
29+
*.vcproj*
30+
*.sln
31+
*.suo
32+
*.ncb
33+
*/Debug/*
34+
*/*/Debug/*
35+
*/Release/*
36+
*/*/Release/*
37+
*/RelWithDebInfo/*
38+
*/*/RelWithDebInfo/*
39+
40+
objs_shared/
41+
objs_static/
42+
43+
examples/chat_server/chat_server
44+
examples/echo_server/echo_server
45+
examples/chat_client/chat_client
46+
examples/echo_client/echo_client
47+
test/basic/tests
48+
libwebsocketpp.dylib.0.1.0
49+
50+
websocketpp.xcodeproj/xcuserdata/*
51+
websocketpp.xcodeproj/project.xcworkspace/xcuserdata/*
52+
policy_based_notes.hpp
53+
54+
examples/echo_server_tls/echo_server_tls
55+
56+
examples/fuzzing_client/fuzzing_client
57+
58+
examples/stress_client/stress_client
59+
60+
examples/broadcast_server_tls/broadcast_server
61+
62+
test/basic/perf
63+
64+
examples/echo_server_tls/echo_server_tls
65+
66+
examples/concurrent_server/concurrent_server
67+
68+
examples/fuzzing_server_tls/fuzzing_server
69+
70+
examples/wsperf/wsperf
71+
72+
.sconsign.dblite
73+
74+
build/
75+
doxygen/
76+
examples/wsperf/wsperf_client
77+
78+
*.out
79+
80+
*.log

Release/libs/websocketpp/.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: cpp
2+
compiler:
3+
- gcc
4+
before_install:
5+
- sudo apt-get install libboost-regex1.48-dev libboost-system1.48-dev libboost-thread1.48-dev libboost-test1.48-dev libboost-random1.48-dev -y
6+
env:
7+
global:
8+
- BOOST_INCLUDES=/usr/include
9+
- BOOST_LIBS=/usr/lib
10+
script: scons -j 2 && scons test
11+
branches:
12+
only:
13+
- master
14+
- permessage-deflate
15+
- experimental
16+
- 0.3.x-cmake
17+
notifications:
18+
recipients:
19+
20+
email:
21+
on_success: change
22+
on_failure: always

0 commit comments

Comments
 (0)