diff --git a/examples/chat/.gitignore b/examples/chat/.gitignore deleted file mode 100644 index a18937a6..00000000 --- a/examples/chat/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -build -venv -node_modules diff --git a/examples/chat/CMakeLists.txt b/examples/chat/CMakeLists.txt deleted file mode 100644 index 8ef6357b..00000000 --- a/examples/chat/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# -# cmd_websocket_chat.cpp -# Author: Benjamin Sergeant -# Copyright (c) 2018 Machine Zone, Inc. All rights reserved. -# - -cmake_minimum_required (VERSION 3.4.1) -project (cmd_websocket_chat) - -set (CMAKE_CXX_STANDARD 14) - -option(USE_TLS "Add TLS support" ON) - -add_executable(cmd_websocket_chat cmd_websocket_chat.cpp) - -if (APPLE AND USE_TLS) - target_link_libraries(cmd_websocket_chat "-framework foundation" "-framework security") -endif() - -target_link_libraries(cmd_websocket_chat ixwebsocket) -install(TARGETS cmd_websocket_chat DESTINATION bin) diff --git a/examples/chat/README.md b/examples/chat/README.md deleted file mode 100644 index 95da4b0e..00000000 --- a/examples/chat/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Building - -1. cmake -G . -2. make - -## Disable TLS - -chat$ cmake -DUSE_TLS=OFF . --- Configuring done --- Generating done --- Build files have been written to: /Users/bsergeant/src/foss/ixwebsocket/examples/chat -chat$ make -Scanning dependencies of target ixwebsocket -[ 16%] Building CXX object ixwebsocket/CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSocket.cpp.o -[ 33%] Building CXX object ixwebsocket/CMakeFiles/ixwebsocket.dir/ixwebsocket/IXWebSocket.cpp.o -[ 50%] Building CXX object ixwebsocket/CMakeFiles/ixwebsocket.dir/ixwebsocket/IXWebSocketTransport.cpp.o -[ 66%] Linking CXX static library libixwebsocket.a -[ 66%] Built target ixwebsocket -[ 83%] Linking CXX executable cmd_websocket_chat -[100%] Built target cmd_websocket_chat - -## Enable TLS (default) - -``` -chat$ cmake -DUSE_TLS=ON . --- Configuring done --- Generating done --- Build files have been written to: /Users/bsergeant/src/foss/ixwebsocket/examples/chat -(venv) chat$ make -Scanning dependencies of target ixwebsocket -[ 14%] Building CXX object ixwebsocket/CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSocket.cpp.o -[ 28%] Building CXX object ixwebsocket/CMakeFiles/ixwebsocket.dir/ixwebsocket/IXWebSocket.cpp.o -[ 42%] Building CXX object ixwebsocket/CMakeFiles/ixwebsocket.dir/ixwebsocket/IXWebSocketTransport.cpp.o -[ 57%] Building CXX object ixwebsocket/CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSocketAppleSSL.cpp.o -[ 71%] Linking CXX static library libixwebsocket.a -[ 71%] Built target ixwebsocket -[ 85%] Linking CXX executable cmd_websocket_chat -[100%] Built target cmd_websocket_chat -``` diff --git a/examples/chat/build_linux.sh b/examples/chat/build_linux.sh deleted file mode 100644 index a5aa90d0..00000000 --- a/examples/chat/build_linux.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# Author: Benjamin Sergeant -# Copyright (c) 2017-2018 Machine Zone, Inc. All rights reserved. -# - -# 'manual' way of building. You can also use cmake. - -g++ --std=c++11 \ - ../../ixwebsocket/IXSocket.cpp \ - ../../ixwebsocket/IXWebSocketTransport.cpp \ - ../../ixwebsocket/IXWebSocket.cpp \ - -I ../.. \ - cmd_websocket_chat.cpp \ - -o cmd_websocket_chat diff --git a/examples/chat/build_macos.sh b/examples/chat/build_macos.sh deleted file mode 100644 index 8f484d66..00000000 --- a/examples/chat/build_macos.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# Author: Benjamin Sergeant -# Copyright (c) 2017-2018 Machine Zone, Inc. All rights reserved. -# - -# 'manual' way of building. You can also use cmake. - -clang++ --std=c++11 --stdlib=libc++ \ - ../../ixwebsocket/IXSocket.cpp \ - ../../ixwebsocket/IXWebSocketTransport.cpp \ - ../../ixwebsocket/IXSocketAppleSSL.cpp \ - ../../ixwebsocket/IXWebSocket.cpp \ - cmd_websocket_chat.cpp \ - -o cmd_websocket_chat \ - -framework Security \ - -framework Foundation diff --git a/examples/chat/package-lock.json b/examples/chat/package-lock.json deleted file mode 100644 index c3b8a0a8..00000000 --- a/examples/chat/package-lock.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "requires": { - "async-limiter": "1.0.0", - "safe-buffer": "5.1.2", - "ultron": "1.1.1" - } - } - } -} diff --git a/examples/chat/package.json b/examples/chat/package.json deleted file mode 100644 index 28f879bf..00000000 --- a/examples/chat/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "msgpack-js": "^0.3.0", - "ws": "^3.3.3" - } -} diff --git a/examples/ws_connect/.gitignore b/examples/ws_connect/.gitignore deleted file mode 100644 index a18937a6..00000000 --- a/examples/ws_connect/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -build -venv -node_modules diff --git a/examples/ws_connect/CMakeLists.txt b/examples/ws_connect/CMakeLists.txt deleted file mode 100644 index 56b012b6..00000000 --- a/examples/ws_connect/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# Author: Benjamin Sergeant -# Copyright (c) 2018 Machine Zone, Inc. All rights reserved. -# - -cmake_minimum_required (VERSION 3.4.1) -project (ws_connect) - -set (CMAKE_CXX_STANDARD 14) - -option(USE_TLS "Add TLS support" ON) - -add_executable(ws_connect ws_connect.cpp) - -if (APPLE AND USE_TLS) - target_link_libraries(ws_connect "-framework foundation" "-framework security") -endif() - -target_link_libraries(ws_connect ixwebsocket) -install(TARGETS ws_connect DESTINATION bin) diff --git a/examples/ws_connect/README.md b/examples/ws_connect/README.md deleted file mode 100644 index 5b520c46..00000000 --- a/examples/ws_connect/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Building - -1. mkdir build -2. cd build -3. cmake .. -4. make - -## Disable TLS - -* Enable: `cmake -DUSE_TLS=OFF ..` -* Disable: `cmake -DUSE_TLS=ON ..` diff --git a/examples/ws_connect/build_linux.sh b/examples/ws_connect/build_linux.sh deleted file mode 100644 index 135bc696..00000000 --- a/examples/ws_connect/build_linux.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# Author: Benjamin Sergeant -# Copyright (c) 2017-2018 Machine Zone, Inc. All rights reserved. -# - -# 'manual' way of building. You can also use cmake. - -g++ --std=c++11 \ - -DIXWEBSOCKET_USE_TLS \ - -g \ - ../../ixwebsocket/IXEventFd.cpp \ - ../../ixwebsocket/IXSocket.cpp \ - ../../ixwebsocket/IXSetThreadName.cpp \ - ../../ixwebsocket/IXWebSocketTransport.cpp \ - ../../ixwebsocket/IXWebSocket.cpp \ - ../../ixwebsocket/IXDNSLookup.cpp \ - ../../ixwebsocket/IXSocketConnect.cpp \ - ../../ixwebsocket/IXSocketOpenSSL.cpp \ - ../../ixwebsocket/IXWebSocketPerMessageDeflate.cpp \ - ../../ixwebsocket/IXWebSocketPerMessageDeflateOptions.cpp \ - -I ../.. \ - ws_connect.cpp \ - -o ws_connect \ - -lcrypto -lssl -lz -lpthread diff --git a/examples/chat/broadcast-server.js b/ws/broadcast-server.js similarity index 100% rename from examples/chat/broadcast-server.js rename to ws/broadcast-server.js diff --git a/examples/chat/broadcast-server.py b/ws/broadcast-server.py similarity index 100% rename from examples/chat/broadcast-server.py rename to ws/broadcast-server.py