Skip to content

Commit

Permalink
Merge 90fc956 into 6d5547a
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Apr 27, 2017
2 parents 6d5547a + 90fc956 commit 5019638
Show file tree
Hide file tree
Showing 127 changed files with 11,202 additions and 7,165 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
bin/
bin64/

# Because of CMake and VS2017
Win32/
x64/

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ after_script:

notifications:
email:
false
false
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
* CMake hide command lines in .vcxproj Output windows"

WebSocket:

* Add is_upgrade() free function

API Changes:

* Provide websocket::stream accept() overloads
* Refactor websocket decorators

--------------------------------------------------------------------------------

1.0.0-b35

* Add Appveyor build scripts and badge
* Tidy up MSVC CMake configuration
* Make close_code a proper enum
* Add flat_streambuf
* Rename to BEAST_DOXYGEN
* Update .gitignore for VS2017
* Fix README.md CMake instructions

API Changes:

* New HTTP interfaces

--------------------------------------------------------------------------------

1.0.0-b34

* Fix and tidy up CMake build scripts
Expand Down
45 changes: 18 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ project (Beast)
set_property (GLOBAL PROPERTY USE_FOLDERS ON)

if (MSVC)
# /wd4244 /wd4127
set (CMAKE_VERBOSE_MAKEFILE FALSE)

add_definitions (-D_WIN32_WINNT=0x0601)
add_definitions (-D_SCL_SECURE_NO_WARNINGS=1)
add_definitions (-D_CRT_SECURE_NO_WARNINGS=1)

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4100 /wd4244 /wd4251 /MP /W4 /bigobj")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4100 /wd4244 /MP /W4 /bigobj")
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ob2 /Oi /Ot /GL")
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi /Ot")

Expand Down Expand Up @@ -44,29 +45,30 @@ option (Boost_USE_STATIC_LIBS "Use static libraries for boost" ON)

set (Boost_NO_SYSTEM_PATHS ON)
set (Boost_USE_MULTITHREADED ON)
add_definitions (-DBOOST_COROUTINES_NO_DEPRECATION_WARNING=1) # for asio

unset (Boost_INCLUDE_DIR CACHE)
unset (Boost_LIBRARY_DIRS CACHE)
find_package (Boost REQUIRED COMPONENTS
coroutine
context
filesystem
program_options
system
thread
)
if (MSVC)
find_package (Boost REQUIRED)
else()
find_package (Boost REQUIRED COMPONENTS
coroutine
context
filesystem
program_options
system
thread
)
link_libraries (${Boost_LIBRARIES})
endif()

include_directories (SYSTEM ${Boost_INCLUDE_DIRS})
link_libraries (${Boost_LIBRARIES})

if (MSVC)
add_definitions (-DBOOST_ALL_NO_LIB) # disable autolinking
elseif (MINGW)
if (MINGW)
link_libraries(ws2_32 mswsock)
endif()

add_definitions (-DBOOST_COROUTINES_NO_DEPRECATION_WARNING=1) # for asio

#-------------------------------------------------------------------------------
#
# OpenSSL
Expand Down Expand Up @@ -164,15 +166,4 @@ file(GLOB_RECURSE EXTRAS_INCLUDES
${PROJECT_SOURCE_DIR}/extras/beast/*.ipp
)

add_subdirectory (examples)
if (NOT OPENSSL_FOUND)
message("OpenSSL not found. Not building examples/ssl")
else()
add_subdirectory (examples/ssl)
endif()

add_subdirectory (test)
add_subdirectory (test/core)
add_subdirectory (test/http)
add_subdirectory (test/websocket)
add_subdirectory (test/zlib)
3 changes: 2 additions & 1 deletion Jamroot
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import os ;
import feature ;
import boost ;
import modules ;
import testing ;

boost.use-project ;

Expand Down Expand Up @@ -125,4 +127,3 @@ project beast
;

build-project test ;
build-project examples ;
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<img width="880" height = "80" alt = "Beast"
src="https://raw.githubusercontent.com/vinniefalco/Beast/master/doc/images/readme.png">

[![Join the chat at https://gitter.im/vinniefalco/Beast](https://badges.gitter.im/vinniefalco/Beast.svg)](https://gitter.im/vinniefalco/Beast?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/vinniefalco/Beast.svg?branch=master)](https://travis-ci.org/vinniefalco/Beast) [![codecov](https://codecov.io/gh/vinniefalco/Beast/branch/master/graph/badge.svg)](https://codecov.io/gh/vinniefalco/Beast) [![coveralls](https://coveralls.io/repos/github/vinniefalco/Beast/badge.svg?branch=master)](https://coveralls.io/github/vinniefalco/Beast?branch=master) [![Documentation](https://img.shields.io/badge/documentation-master-brightgreen.svg)](http://vinniefalco.github.io/beast/) [![License](https://img.shields.io/badge/license-boost-brightgreen.svg)](LICENSE_1_0.txt)
[![Join the chat at https://gitter.im/vinniefalco/Beast](https://badges.gitter.im/vinniefalco/Beast.svg)](https://gitter.im/vinniefalco/Beast?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/vinniefalco/Beast.svg?branch=master)](https://travis-ci.org/vinniefalco/Beast)
[![Build status](https://ci.appveyor.com/api/projects/status/g0llpbvhpjuxjnlw?svg=true)](https://ci.appveyor.com/project/vinniefalco/beast)
[![codecov](https://codecov.io/gh/vinniefalco/Beast/branch/master/graph/badge.svg)](https://codecov.io/gh/vinniefalco/Beast)
[![coveralls](https://coveralls.io/repos/github/vinniefalco/Beast/badge.svg?branch=master)](https://coveralls.io/github/vinniefalco/Beast?branch=master)
[![Documentation](https://img.shields.io/badge/documentation-master-brightgreen.svg)](http://vinniefalco.github.io/beast/)
[![License](https://img.shields.io/badge/license-boost-brightgreen.svg)](LICENSE_1_0.txt)

# HTTP and WebSocket built on Boost.Asio in C++11

Expand Down Expand Up @@ -106,24 +112,18 @@ instructions on how to do this for your particular build system.

For the examples and tests, Beast provides build scripts for Boost.Build (bjam)
and CMake. It is possible to generate Microsoft Visual Studio or Apple
Developers using Microsoft Visual Studio can generate Visual Studio
project files by executing these commands from the root of the repository:
Xcode project files using CMake by executing these commands from
the root of the repository:

```
cd bin
cmake .. # for 32-bit Windows builds
cmake -G Xcode .. # for Apple Xcode builds
cd ../bin64
cmake .. # for Linux/Mac builds, OR
cmake -G"Visual Studio 14 2015 Win64" .. # for 64-bit Windows builds
```

When using Apple Xcode it is possible to generate Xcode project files
using these commands:
cmake -G"Visual Studio 14 2015 Win64" .. # for 64-bit Windows builds (VS2015)
cmake -G"Visual Studio 15 2017 Win64" .. # for 64-bit Windows builds (VS2017)
```
cd bin
cmake -G Xcode .. # for Apple Xcode builds
```

To build with Boost.Build, it is necessary to have the bjam executable
Expand Down
100 changes: 100 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Copyright 2016 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)

#version: 1.0.{build}-{branch}
version: "{branch} (#{build})"

shallow_clone: true

platform:
- x86
- x64

configuration:
- Debug
- Release

install:
- cd ..
- git clone https://github.com/boostorg/boost.git boost
- cd boost
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\beast\
- git submodule update --init tools/build
- git submodule update --init libs/config
- git submodule update --init tools/boostdep
# - python tools/boostdep/depinst/depinst.py beast
- git submodule update --init libs/any
- git submodule update --init libs/asio
- git submodule update --init libs/algorithm
- git submodule update --init libs/array
- git submodule update --init libs/assert
- git submodule update --init libs/atomic
- git submodule update --init libs/bind
- git submodule update --init libs/chrono
- git submodule update --init libs/concept_check
- git submodule update --init libs/config
- git submodule update --init libs/container
- git submodule update --init libs/context
- git submodule update --init libs/conversion
- git submodule update --init libs/core
- git submodule update --init libs/coroutine
- git submodule update --init libs/date_time
- git submodule update --init libs/detail
- git submodule update --init libs/endian
- git submodule update --init libs/exception
- git submodule update --init libs/filesystem
- git submodule update --init libs/foreach
- git submodule update --init libs/function
- git submodule update --init libs/function_types
- git submodule update --init libs/functional
- git submodule update --init libs/fusion
- git submodule update --init libs/integer
- git submodule update --init libs/intrusive
- git submodule update --init libs/io
- git submodule update --init libs/iostreams
- git submodule update --init libs/iterator
- git submodule update --init libs/lambda
- git submodule update --init libs/lexical_cast
- git submodule update --init libs/locale
- git submodule update --init libs/math
- git submodule update --init libs/move
- git submodule update --init libs/mpl
- git submodule update --init libs/numeric/conversion
- git submodule update --init libs/optional
# - git submodule update --init libs/phoenix
- git submodule update --init libs/pool
- git submodule update --init libs/predef
- git submodule update --init libs/preprocessor
- git submodule update --init libs/program_options
- git submodule update --init libs/proto
- git submodule update --init libs/random
- git submodule update --init libs/range
- git submodule update --init libs/ratio
- git submodule update --init libs/rational
- git submodule update --init libs/regex
- git submodule update --init libs/serialization
- git submodule update --init libs/smart_ptr
# - git submodule update --init libs/spirit
- git submodule update --init libs/static_assert
- git submodule update --init libs/system
- git submodule update --init libs/thread
- git submodule update --init libs/throw_exception
- git submodule update --init libs/tokenizer
- git submodule update --init libs/tti
- git submodule update --init libs/tuple
- git submodule update --init libs/type_index
- git submodule update --init libs/type_traits
- git submodule update --init libs/typeof
- git submodule update --init libs/unordered
- git submodule update --init libs/utility
- git submodule update --init libs/variant
- git submodule update --init libs/winapi
- bootstrap
- b2 headers

build: off

test_script:
- b2 libs/beast/examples toolset=msvc-14.0
- b2 libs/beast/test toolset=msvc-14.0
16 changes: 3 additions & 13 deletions doc/http.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ contents:
Algorithms
Write
Read
Parse
Examples
Send Request
Receive Response
Expand Down Expand Up @@ -136,7 +135,7 @@ object:
[[HTTP Request] [HTTP Response]]
[[
```
request<empty_body> req;
request<string_body> req;
req.version = 11; // HTTP/1.1
req.method = "GET";
req.url = "/index.htm"
Expand Down Expand Up @@ -227,15 +226,6 @@ The message [*`Body`] template parameter controls both the type of the data
member of the resulting message object, and the algorithms used during parsing
and serialization. Beast provides three very common [*`Body`] types:

* [link beast.ref.http__empty_body [*`empty_body`:]] An empty message body.
Used in GET requests where there is no message body. Example:
```
request<empty_body> req;
req.version = 11;
req.method = "GET";
req.url = "/index.html";
```

* [link beast.ref.http__string_body [*`string_body`:]] A body with a
`value_type` as `std::string`. Useful for quickly putting together a request
or response with simple text in the message body (such as an error message).
Expand Down Expand Up @@ -303,7 +293,7 @@ operations performed). To send messages synchronously, use one of the
```
void send_request(boost::asio::ip::tcp::socket& sock)
{
request<empty_body> req;
request<string_body> req;
req.version = 11;
req.method = "GET";
req.url = "/index.html";
Expand All @@ -322,7 +312,7 @@ An asynchronous interface is available:
```
void handle_write(boost::system::error_code);
...
request<empty_body> req;
request<string_body> req;
...
async_write(sock, req, std::bind(&handle_write, std::placeholders::_1));
```
Expand Down
1 change: 0 additions & 1 deletion doc/master.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ provides implementations of the HTTP and WebSocket protocols.
[include types/DynamicBuffer.qbk]
[include types/Field.qbk]
[include types/FieldSequence.qbk]
[include types/Parser.qbk]
[include types/Reader.qbk]
[include types/Streams.qbk]
[include types/Writer.qbk]
Expand Down

0 comments on commit 5019638

Please sign in to comment.