├── test ├── extern │ └── zlib-1.2.11 │ │ ├── contrib │ │ ├── blast │ │ │ ├── test.txt │ │ │ ├── README │ │ │ ├── test.pk │ │ │ └── Makefile │ │ ├── infback9 │ │ │ └── README │ │ ├── puff │ │ │ ├── zeros.raw │ │ │ └── puff.h │ │ ├── masmx64 │ │ │ ├── bld_ml64.bat │ │ │ └── readme.txt │ │ ├── dotzlib │ │ │ ├── DotZLib.chm │ │ │ ├── DotZLib │ │ │ │ ├── CodecBase.cs │ │ │ │ ├── Deflater.cs │ │ │ │ ├── DotZLib.cs │ │ │ │ ├── Inflater.cs │ │ │ │ ├── GZipStream.cs │ │ │ │ ├── ChecksumImpl.cs │ │ │ │ └── CircularBuffer.cs │ │ │ ├── DotZLib.sln │ │ │ ├── DotZLib.build │ │ │ └── LICENSE_1_0.txt │ │ ├── masmx86 │ │ │ ├── bld_ml32.bat │ │ │ └── readme.txt │ │ ├── minizip │ │ │ ├── MiniZip64_Changes.txt │ │ │ ├── minizip.pc.in │ │ │ ├── Makefile │ │ │ ├── mztools.h │ │ │ ├── configure.ac │ │ │ ├── iowin32.h │ │ │ ├── make_vms.com │ │ │ ├── Makefile.am │ │ │ └── minizip.1 │ │ ├── delphi │ │ │ └── ZLibConst.pas │ │ ├── testzlib │ │ │ └── testzlib.txt │ │ ├── untgz │ │ │ ├── Makefile │ │ │ └── Makefile.msc │ │ ├── iostream3 │ │ │ ├── TODO │ │ │ └── README │ │ ├── ada │ │ │ └── zlib.gpr │ │ ├── iostream │ │ │ └── test.cpp │ │ ├── iostream2 │ │ │ └── zstream_test.cpp │ │ └── vstudio │ │ │ ├── vc10 │ │ │ ├── miniunz.vcxproj.filters │ │ │ ├── minizip.vcxproj.filters │ │ │ ├── testzlibdll.vcxproj.filters │ │ │ └── zlib.rc │ │ │ ├── vc11 │ │ │ └── zlib.rc │ │ │ ├── vc12 │ │ │ └── zlib.rc │ │ │ ├── vc14 │ │ │ └── zlib.rc │ │ │ └── vc9 │ │ │ └── zlib.rc │ │ ├── zlib.3.pdf │ │ ├── Makefile │ │ ├── old │ │ ├── README │ │ └── os2 │ │ │ └── zlib.def │ │ ├── nintendods │ │ └── README │ │ ├── .gitignore │ │ ├── zlib.pc.in │ │ ├── zlib.pc.cmakein │ │ ├── inffast.h │ │ ├── gzclose.c │ │ └── watcom │ │ ├── watcom_l.mak │ │ └── watcom_f.mak ├── extras │ ├── README.md │ └── include │ │ └── boost │ │ └── beast │ │ ├── test │ │ ├── sig_wait.hpp │ │ └── throughput.hpp │ │ └── unit_test │ │ ├── global_suites.hpp │ │ └── amount.hpp ├── example │ ├── CMakeLists.txt │ ├── common │ │ ├── main.cpp │ │ ├── detect_ssl.cpp │ │ ├── write_msg.cpp │ │ ├── session_alloc.cpp │ │ ├── ssl_stream.cpp │ │ ├── server_certificate.cpp │ │ ├── root_certificates.cpp │ │ ├── Jamfile │ │ └── CMakeLists.txt │ └── Jamfile ├── beast │ ├── core.cpp │ ├── http.cpp │ ├── zlib.cpp │ ├── config.cpp │ ├── version.cpp │ ├── core │ │ ├── error.cpp │ │ ├── file.cpp │ │ ├── string.cpp │ │ ├── prepare_buffers.cpp │ │ ├── file_stdio.cpp │ │ ├── file_posix.cpp │ │ ├── file_win32.cpp │ │ ├── clamp.cpp │ │ ├── detail │ │ │ └── varint.cpp │ │ ├── Jamfile │ │ ├── async_result.cpp │ │ ├── read_size.cpp │ │ └── CMakeLists.txt │ ├── websocket.cpp │ ├── websocket │ │ ├── role.cpp │ │ ├── option.cpp │ │ ├── teardown.cpp │ │ ├── Jamfile │ │ ├── CMakeLists.txt │ │ ├── mask.cpp │ │ └── rfc6455.cpp │ ├── http │ │ ├── buffer_body.cpp │ │ ├── basic_file_body.cpp │ │ ├── basic_dynamic_body.cpp │ │ ├── empty_body.cpp │ │ ├── string_body.cpp │ │ ├── vector_body.cpp │ │ ├── type_traits.cpp │ │ ├── Jamfile │ │ └── CMakeLists.txt │ ├── zlib │ │ ├── Jamfile │ │ └── CMakeLists.txt │ ├── Jamfile │ └── CMakeLists.txt ├── bench │ ├── zlib │ │ ├── Jamfile │ │ └── CMakeLists.txt │ ├── CMakeLists.txt │ ├── Jamfile │ ├── wsload │ │ ├── Jamfile │ │ └── CMakeLists.txt │ ├── buffers │ │ ├── Jamfile │ │ └── CMakeLists.txt │ ├── utf8_checker │ │ ├── Jamfile │ │ └── CMakeLists.txt │ └── parser │ │ ├── Jamfile │ │ ├── CMakeLists.txt │ │ ├── nodejs_parser.cpp │ │ └── nodejs-parser │ │ └── LICENSE-MIT ├── doc │ ├── Jamfile │ └── CMakeLists.txt └── Jamfile ├── doc ├── .gitignore ├── docca │ ├── example │ │ ├── .gitignore │ │ ├── makeqbk.sh │ │ ├── index.xml │ │ ├── reference.xsl │ │ └── main.qbk │ └── README.md ├── images │ ├── message.png │ └── readme2.png ├── xsl │ ├── includes.xsl │ ├── config.xsl │ └── includes_foot.xsl └── qbk │ ├── 07_concepts │ ├── BufferSequence.qbk │ └── Streams.qbk │ ├── index.xml │ ├── 07_concepts.qbk │ ├── 06_websocket │ └── 2_connect.qbk │ ├── 03_core.qbk │ ├── 03_core │ └── 4_files.qbk │ └── 06_websocket.qbk ├── .gitignore ├── include └── boost │ ├── beast │ ├── core │ │ ├── detail │ │ │ ├── base64.hpp │ │ │ ├── config.hpp │ │ │ ├── allocator.hpp │ │ │ ├── in_place_init.hpp │ │ │ └── clamp.hpp │ │ └── file.hpp │ ├── zlib.hpp │ ├── websocket.hpp │ ├── http │ │ ├── dynamic_body.hpp │ │ ├── file_body.hpp │ │ └── impl │ │ │ └── parser.ipp │ ├── version.hpp │ ├── websocket │ │ ├── detail │ │ │ └── type_traits.hpp │ │ ├── error.hpp │ │ └── impl │ │ │ ├── rfc6455.ipp │ │ │ └── ssl.ipp │ ├── http.hpp │ ├── config.hpp │ └── core.hpp │ └── beast.hpp ├── tools ├── local-travis.sh ├── valgrind.supp ├── make_field.sh ├── blacklist.supp └── install-dependencies.sh ├── CODE_OF_CONDUCT.md ├── .gitattributes ├── example ├── http │ ├── Jamfile │ ├── CMakeLists.txt │ ├── client │ │ ├── coro │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── sync │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── async │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── crawl │ │ │ ├── Jamfile │ │ │ ├── urls_large_data.hpp │ │ │ └── CMakeLists.txt │ │ ├── async-ssl │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── coro-ssl │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── sync-ssl │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── CMakeLists.txt │ │ └── Jamfile │ └── server │ │ ├── coro │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── fast │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── sync │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── async │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── small │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── stackless │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── flex │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── async-ssl │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── coro-ssl │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── sync-ssl │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── stackless-ssl │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── Jamfile │ │ └── CMakeLists.txt ├── websocket │ ├── Jamfile │ ├── CMakeLists.txt │ ├── client │ │ ├── coro │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── sync │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── async │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── CMakeLists.txt │ │ ├── Jamfile │ │ ├── async-ssl │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ ├── coro-ssl │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ │ └── sync-ssl │ │ │ ├── Jamfile │ │ │ └── CMakeLists.txt │ └── server │ │ ├── coro │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── fast │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── sync │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── async │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── stackless │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── async-ssl │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── coro-ssl │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── sync-ssl │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── stackless-ssl │ │ ├── Jamfile │ │ └── CMakeLists.txt │ │ ├── CMakeLists.txt │ │ └── Jamfile ├── advanced │ ├── CMakeLists.txt │ ├── Jamfile │ ├── server │ │ ├── Jamfile │ │ └── CMakeLists.txt │ └── server-flex │ │ ├── Jamfile │ │ └── CMakeLists.txt ├── Jamfile ├── CMakeLists.txt └── echo-op │ ├── Jamfile │ └── CMakeLists.txt ├── meta └── libraries.json ├── index.html ├── .github └── ISSUE_TEMPLATE.md └── LICENSE_1_0.txt /test/extern/zlib-1.2.11/contrib/blast/test.txt: -------------------------------------------------------------------------------- 1 | AIAIAIAIAIAIA -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | html 2 | temp 3 | out.txt 4 | qbk/reference.qbk 5 | -------------------------------------------------------------------------------- /doc/docca/example/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | html 3 | temp 4 | reference.qbk 5 | out.txt 6 | -------------------------------------------------------------------------------- /doc/images/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/doc/images/message.png -------------------------------------------------------------------------------- /doc/images/readme2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/doc/images/readme2.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | bin64/ 3 | 4 | # Because of CMake and VS2017 5 | Win32/ 6 | x64/ 7 | 8 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/infback9/README: -------------------------------------------------------------------------------- 1 | See infback9.h for what this is and how to use it. 2 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/zlib.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/zlib.3.pdf -------------------------------------------------------------------------------- /include/boost/beast/core/detail/base64.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/include/boost/beast/core/detail/base64.hpp -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/blast/README: -------------------------------------------------------------------------------- 1 | Read blast.h for purpose and usage. 2 | 3 | Mark Adler 4 | madler@alumni.caltech.edu 5 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/blast/test.pk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/blast/test.pk -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/puff/zeros.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/puff/zeros.raw -------------------------------------------------------------------------------- /doc/docca/README.md: -------------------------------------------------------------------------------- 1 | # docca 2 | Boost.Book XSLT C++ documentation system 3 | 4 | [Example Documentation](http://vinniefalco.github.io/docca/) 5 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/masmx64/bld_ml64.bat: -------------------------------------------------------------------------------- 1 | ml64.exe /Flinffasx64 /c /Zi inffasx64.asm 2 | ml64.exe /Flgvmat64 /c /Zi gvmat64.asm 3 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | -@echo "Please use ./configure first. Thank you." 3 | 4 | distclean: 5 | make -f Makefile.in distclean 6 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib.chm -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/masmx86/bld_ml32.bat: -------------------------------------------------------------------------------- 1 | ml /coff /Zi /c /Flmatch686.lst match686.asm 2 | ml /coff /Zi /c /Flinffas32.lst inffas32.asm 3 | -------------------------------------------------------------------------------- /tools/local-travis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export VARIANT=ubasan 4 | export TOOLSET=clang 5 | export TRAVIS=0 6 | export BOOST_ROOT="`pwd`" 7 | 8 | "$1" 9 | -------------------------------------------------------------------------------- /test/extras/README.md: -------------------------------------------------------------------------------- 1 | # Extras 2 | 3 | These are not part of the official public Beast interface but they are used by the tests and some third party programs. 4 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/CodecBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/CodecBase.cs -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/Deflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/Deflater.cs -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/Inflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/Inflater.cs -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/GZipStream.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/GZipStream.cs -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/ChecksumImpl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/ChecksumImpl.cs -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/CircularBuffer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceph/Beast/master/test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib/CircularBuffer.cs -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/old/README: -------------------------------------------------------------------------------- 1 | This directory contains files that have not been updated for zlib 1.2.x 2 | 3 | (Volunteers are encouraged to help clean this up. Thanks.) 4 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/minizip/MiniZip64_Changes.txt: -------------------------------------------------------------------------------- 1 | 2 | MiniZip 1.1 was derrived from MiniZip at version 1.01f 3 | 4 | Change in 1.0 (Okt 2009) 5 | - **TODO - Add history** 6 | 7 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | * Be respectful of others 4 | 5 | * Please use professional conduct 6 | 7 | * Treat others the way you want to be treated 8 | 9 | Thank you! 10 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/blast/Makefile: -------------------------------------------------------------------------------- 1 | blast: blast.c blast.h 2 | cc -DTEST -o blast blast.c 3 | 4 | test: blast 5 | blast < test.pk | cmp - test.txt 6 | 7 | clean: 8 | rm -f blast blast.o 9 | -------------------------------------------------------------------------------- /doc/xsl/includes.xsl: -------------------------------------------------------------------------------- 1 | 2 | Defined in header [include_file 3 | 4 | ] 5 | 6 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/nintendods/README: -------------------------------------------------------------------------------- 1 | This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. 2 | 3 | Eduardo Costa 4 | January 3, 2009 5 | 6 | -------------------------------------------------------------------------------- /doc/xsl/config.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/delphi/ZLibConst.pas: -------------------------------------------------------------------------------- 1 | unit ZLibConst; 2 | 3 | interface 4 | 5 | resourcestring 6 | sTargetBufferTooSmall = 'ZLib error: target buffer may be too small'; 7 | sInvalidStreamOp = 'Invalid stream operation'; 8 | 9 | implementation 10 | 11 | end. 12 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/testzlib/testzlib.txt: -------------------------------------------------------------------------------- 1 | To build testzLib with Visual Studio 2005: 2 | 3 | copy to a directory file from : 4 | - root of zLib tree 5 | - contrib/testzlib 6 | - contrib/masmx86 7 | - contrib/masmx64 8 | - contrib/vstudio/vc7 9 | 10 | and open testzlib8.sln -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Github 5 | .md text eol=lf 6 | 7 | # Visual Studio 8 | *.sln text eol=crlf 9 | *.vcproj text eol=crlf 10 | *.vcxproj text eol=crlf 11 | *.props text eol=crlf 12 | *.filters text eol=crlf 13 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/.gitignore: -------------------------------------------------------------------------------- 1 | *.diff 2 | *.patch 3 | *.orig 4 | *.rej 5 | 6 | *~ 7 | *.a 8 | *.lo 9 | *.o 10 | *.dylib 11 | 12 | *.gcda 13 | *.gcno 14 | *.gcov 15 | 16 | /example 17 | /example64 18 | /examplesh 19 | /libz.so* 20 | /minigzip 21 | /minigzip64 22 | /minigzipsh 23 | /zlib.pc 24 | /configure.log 25 | 26 | .DS_Store 27 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/untgz/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-g 3 | 4 | untgz: untgz.o ../../libz.a 5 | $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz 6 | 7 | untgz.o: untgz.c ../../zlib.h 8 | $(CC) $(CFLAGS) -c -I../.. untgz.c 9 | 10 | ../../libz.a: 11 | cd ../..; ./configure; make 12 | 13 | clean: 14 | rm -f untgz untgz.o *~ 15 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/zlib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | sharedlibdir=@sharedlibdir@ 5 | includedir=@includedir@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/minizip/minizip.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@/minizip 5 | 6 | Name: minizip 7 | Description: Minizip zip file manipulation library 8 | Requires: 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lminizip 11 | Libs.private: -lz 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /test/example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (common) 11 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/zlib.pc.cmakein: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@INSTALL_LIB_DIR@ 4 | sharedlibdir=@INSTALL_LIB_DIR@ 5 | includedir=@INSTALL_INC_DIR@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /test/example/common/main.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | int main() 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /example/http/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | build-project client ; 11 | build-project server ; 12 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/untgz/Makefile.msc: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS=-MD 3 | 4 | untgz.exe: untgz.obj ..\..\zlib.lib 5 | $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib 6 | 7 | untgz.obj: untgz.c ..\..\zlib.h 8 | $(CC) $(CFLAGS) -c -I..\.. untgz.c 9 | 10 | ..\..\zlib.lib: 11 | cd ..\.. 12 | $(MAKE) -f win32\makefile.msc 13 | cd contrib\untgz 14 | 15 | clean: 16 | -del untgz.obj 17 | -del untgz.exe 18 | -------------------------------------------------------------------------------- /example/websocket/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | build-project client ; 11 | build-project server ; 12 | -------------------------------------------------------------------------------- /example/http/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (client) 11 | add_subdirectory (server) 12 | -------------------------------------------------------------------------------- /meta/libraries.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "beast", 3 | "name": "Beast", 4 | "authors": [ 5 | "Vinnie Falco" 6 | ], 7 | "description": "Portable HTTP, WebSocket, and network operations using only C++11 and Boost.Asio", 8 | "category": [ 9 | "Concurrent", 10 | "IO" 11 | ], 12 | "maintainers": [ 13 | "Vinnie Falco " 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /example/websocket/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (client) 11 | add_subdirectory (server) 12 | -------------------------------------------------------------------------------- /example/advanced/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (server) 11 | add_subdirectory (server-flex) 12 | -------------------------------------------------------------------------------- /test/beast/core.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/http.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/zlib.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/config.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/version.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/core/error.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/core/file.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/websocket.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/core/string.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/websocket/role.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /doc/docca/example/makeqbk.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | # Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot com) 4 | # 5 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 6 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | mkdir -p temp 9 | doxygen source.dox 10 | cd temp 11 | xsltproc combine.xslt index.xml > all.xml 12 | xsltproc ../reference.xsl all.xml > ../reference.qbk 13 | 14 | -------------------------------------------------------------------------------- /test/beast/http/buffer_body.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/websocket/option.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/core/prepare_buffers.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | -------------------------------------------------------------------------------- /test/beast/http/basic_file_body.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/beast/websocket/teardown.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /test/example/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | alias run-tests : 11 | common//run-tests 12 | ; 13 | 14 | alias fat-tests ; 15 | 16 | explicit fat-tests ; 17 | -------------------------------------------------------------------------------- /test/example/common/detect_ssl.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include "example/common/detect_ssl.hpp" 12 | 13 | -------------------------------------------------------------------------------- /test/example/common/write_msg.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include "example/common/write_msg.hpp" 12 | 13 | -------------------------------------------------------------------------------- /test/example/common/session_alloc.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include "example/common/session_alloc.hpp" 12 | 13 | -------------------------------------------------------------------------------- /example/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | build-project advanced ; 11 | build-project http ; 12 | build-project websocket ; 13 | 14 | # legacy 15 | build-project echo-op ; 16 | -------------------------------------------------------------------------------- /test/beast/http/basic_dynamic_body.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | -------------------------------------------------------------------------------- /example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (advanced) 11 | add_subdirectory (http) 12 | add_subdirectory (websocket) 13 | 14 | add_subdirectory (echo-op) 15 | -------------------------------------------------------------------------------- /example/echo-op/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe echo-op : 11 | echo_op.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /test/bench/zlib/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe bench-zlib : 11 | $(ZLIB_SOURCES) 12 | $(TEST_MAIN) 13 | deflate_stream.cpp 14 | inflate_stream.cpp 15 | ; 16 | -------------------------------------------------------------------------------- /example/advanced/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | build-project server ; 11 | 12 | # VFALCO How do I make this work on Windows and if OpenSSL is not available? 13 | #build-project server-flex ; 14 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /example/advanced/server/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe advanced-server : 11 | advanced_server.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/http/client/coro/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-client-coro : 11 | http_client_coro.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/http/client/sync/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-client-sync : 11 | http_client_sync.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/http/server/coro/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-server-coro : 11 | http_server_coro.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/http/server/fast/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-server-fast : 11 | http_server_fast.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/http/server/sync/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-server-sync : 11 | http_server_sync.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /test/bench/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (buffers) 11 | add_subdirectory (parser) 12 | add_subdirectory (utf8_checker) 13 | add_subdirectory (wsload) 14 | add_subdirectory (zlib) 15 | -------------------------------------------------------------------------------- /doc/docca/example/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 |
12 | Index 13 | 14 |
15 | -------------------------------------------------------------------------------- /example/http/client/async/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-client-async : 11 | http_client_async.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/http/server/async/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-server-async : 11 | http_server_async.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/http/server/small/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-server-small : 11 | http_server_small.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /test/example/common/ssl_stream.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #if BOOST_BEAST_USE_OPENSSL 11 | 12 | // Test that header file is self-contained. 13 | #include "example/common/ssl_stream.hpp" 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /example/http/server/stackless/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-server-stackless : 11 | http_server_stackless.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/websocket/client/coro/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe websocket-client-coro : 11 | websocket_client_coro.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/websocket/client/sync/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe websocket-client-sync : 11 | websocket_client_sync.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/websocket/server/coro/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe websocket-server-coro : 11 | websocket_server_coro.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/websocket/server/fast/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe websocket-server-fast : 11 | websocket_server_fast.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/websocket/server/sync/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe websocket-server-sync : 11 | websocket_server_sync.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/http/client/crawl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe http-crawl : 11 | http_crawl.cpp 12 | urls_large_data.cpp 13 | : 14 | coverage:no 15 | ubasan:no 16 | ; 17 | -------------------------------------------------------------------------------- /example/websocket/client/async/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe websocket-client-async : 11 | websocket_client_async.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /example/websocket/server/async/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe websocket-server-async : 11 | websocket_server_async.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /doc/docca/example/reference.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/example/common/server_certificate.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #if BOOST_BEAST_USE_OPENSSL 11 | 12 | // Test that header file is self-contained. 13 | #include "example/common/server_certificate.hpp" 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /example/websocket/server/stackless/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe websocket-server-stackless : 11 | websocket_server_stackless.cpp 12 | : 13 | coverage:no 14 | ubasan:no 15 | ; 16 | -------------------------------------------------------------------------------- /test/bench/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | alias run-tests : 11 | buffers//run-tests 12 | parser//run-tests 13 | wsload//run-tests 14 | utf8_checker//run-tests 15 | #zlib//run-tests # Not built 16 | ; 17 | -------------------------------------------------------------------------------- /test/example/common/root_certificates.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #if BOOST_BEAST_USE_OPENSSL 11 | 12 | // Test that header file is self-contained. 13 | #include "example/common/root_certificates.hpp" 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /test/bench/wsload/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe wsload : 11 | $(TEST_MAIN) 12 | wsload.cpp 13 | ; 14 | 15 | explicit wsload ; 16 | 17 | alias run-tests : 18 | [ compile wsload.cpp : : wsload-compile ] 19 | ; 20 | -------------------------------------------------------------------------------- /example/echo-op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/echo-op "/") 12 | 13 | add_executable (echo-op 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | echo_op.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /test/bench/buffers/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe bench-buffers : 11 | $(TEST_MAIN) 12 | bench_buffers.cpp 13 | ; 14 | 15 | explicit bench-buffers ; 16 | 17 | alias run-tests : 18 | [ compile bench_buffers.cpp ] 19 | ; 20 | -------------------------------------------------------------------------------- /test/bench/utf8_checker/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe bench-utf8-checker : 11 | $(TEST_MAIN) 12 | bench_utf8_checker.cpp 13 | ; 14 | 15 | explicit bench-utf8-checker ; 16 | 17 | alias run-tests : 18 | [ compile bench_utf8_checker.cpp ] 19 | ; 20 | -------------------------------------------------------------------------------- /example/advanced/server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/advanced/server "/") 12 | 13 | add_executable (advanced-server 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | advanced_server.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/http/client/coro/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/http/client/coro "/") 12 | 13 | add_executable (http-client-coro 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | http_client_coro.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/http/client/sync/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/http/client/sync "/") 12 | 13 | add_executable (http-client-sync 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | http_client_sync.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/http/server/coro/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/http/server/coro "/") 12 | 13 | add_executable (http-server-coro 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | http_server_coro.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/http/server/sync/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/http/server/sync "/") 12 | 13 | add_executable (http-server-sync 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | http_server_sync.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /doc/qbk/07_concepts/BufferSequence.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | Official repository: https://github.com/boostorg/beast 8 | ] 9 | 10 | [section:BufferSequence BufferSequence] 11 | 12 | A [*BufferSequence] is a type meeting either of the following requirements: 13 | 14 | * __ConstBufferSequence__ 15 | * __MutableBufferSequence__ 16 | 17 | [endsect] 18 | -------------------------------------------------------------------------------- /example/http/client/async/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/http/client/async "/") 12 | 13 | add_executable (http-client-async 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | http_client_async.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/http/server/async/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/http/server/async "/") 12 | 13 | add_executable (http-server-async 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | http_server_async.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/http/server/small/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/http/server/small "/") 12 | 13 | add_executable (http-server-small 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | http_server_small.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /doc/qbk/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 |
13 | Index 14 | 15 |
16 | -------------------------------------------------------------------------------- /example/http/server/stackless/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/http/server/stackless "/") 12 | 13 | add_executable (http-server-stackless 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | http_server_stackless.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/websocket/client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (async) 11 | add_subdirectory (coro) 12 | add_subdirectory (sync) 13 | 14 | if (OPENSSL_FOUND) 15 | add_subdirectory (async-ssl) 16 | add_subdirectory (coro-ssl) 17 | add_subdirectory (sync-ssl) 18 | endif() 19 | -------------------------------------------------------------------------------- /example/websocket/client/coro/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/websocket/client/coro "/") 12 | 13 | add_executable (websocket-client-coro 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | websocket_client_coro.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/websocket/client/sync/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/websocket/client/sync "/") 12 | 13 | add_executable (websocket-client-sync 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | websocket_client_sync.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/websocket/server/coro/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/websocket/server/coro "/") 12 | 13 | add_executable (websocket-server-coro 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | websocket_server_coro.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/websocket/server/fast/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/websocket/server/fast "/") 12 | 13 | add_executable (websocket-server-fast 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | websocket_server_fast.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/websocket/server/sync/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/websocket/server/sync "/") 12 | 13 | add_executable (websocket-server-sync 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | websocket_server_sync.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/iostream3/TODO: -------------------------------------------------------------------------------- 1 | Possible upgrades to gzfilebuf: 2 | 3 | - The ability to do putback (e.g. putbackfail) 4 | 5 | - The ability to seek (zlib supports this, but could be slow/tricky) 6 | 7 | - Simultaneous read/write access (does it make sense?) 8 | 9 | - Support for ios_base::ate open mode 10 | 11 | - Locale support? 12 | 13 | - Check public interface to see which calls give problems 14 | (due to dependence on library internals) 15 | 16 | - Override operator<<(ostream&, gzfilebuf*) to allow direct copying 17 | of stream buffer to stream ( i.e. os << is.rdbuf(); ) 18 | -------------------------------------------------------------------------------- /example/websocket/client/async/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/websocket/client/async "/") 12 | 13 | add_executable (websocket-client-async 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | websocket_client_async.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/websocket/server/async/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/websocket/server/async "/") 12 | 13 | add_executable (websocket-server-async 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | websocket_server_async.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /test/bench/parser/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | exe bench-parser : 11 | $(TEST_MAIN) 12 | nodejs_parser.cpp 13 | bench_parser.cpp 14 | ; 15 | 16 | explicit bench-parser ; 17 | 18 | alias run-tests : 19 | [ compile nodejs_parser.cpp ] 20 | [ compile bench_parser.cpp ] 21 | ; 22 | -------------------------------------------------------------------------------- /example/http/server/flex/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe http-server-async-ssl : 17 | http_server_async_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/websocket/client/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | build-project async ; 11 | build-project coro ; 12 | build-project sync ; 13 | 14 | # VFALCO How do I make this work on Windows and if OpenSSL is not available? 15 | #build-project async-ssl ; 16 | #build-project coro-ssl ; 17 | #build-project sync-ssl ; 18 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/minizip/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-O -I../.. 3 | 4 | UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a 5 | ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a 6 | 7 | .c.o: 8 | $(CC) -c $(CFLAGS) $*.c 9 | 10 | all: miniunz minizip 11 | 12 | miniunz: $(UNZ_OBJS) 13 | $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) 14 | 15 | minizip: $(ZIP_OBJS) 16 | $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) 17 | 18 | test: miniunz minizip 19 | ./minizip test readme.txt 20 | ./miniunz -l test.zip 21 | mv readme.txt readme.old 22 | ./miniunz test.zip 23 | 24 | clean: 25 | /bin/rm -f *.o *~ minizip miniunz 26 | -------------------------------------------------------------------------------- /tools/valgrind.supp: -------------------------------------------------------------------------------- 1 | { 2 | zlib_fill_window_no_init 3 | Memcheck:Cond 4 | fun:fill_window 5 | } 6 | { 7 | beast_fill_window_no_init 8 | Memcheck:Cond 9 | fun:_ZN5beast4zlib6detail14deflate_stream11fill_windowIvEEvRNS0_8z_paramsE 10 | } 11 | { 12 | Ignore OpenSSL malloc 13 | Memcheck:Leak 14 | fun:malloc 15 | fun:CRYPTO_malloc 16 | obj:*libcrypto* 17 | } 18 | { 19 | Ignore OpenSSL realloc 20 | Memcheck:Leak 21 | fun:realloc 22 | fun:CRYPTO_realloc 23 | obj:*libcrypto* 24 | } 25 | { 26 | OpenSSL Non-Purify 27 | Memcheck:Cond 28 | obj:*libcrypto* 29 | } 30 | -------------------------------------------------------------------------------- /example/advanced/server-flex/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe advanced-server-flex : 17 | advanced_server_flex.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/http/client/async-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe http-client-async-ssl : 17 | http_client_async_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/http/client/coro-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe http-client-coro-ssl : 17 | http_client_coro_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/http/client/sync-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe http-client-sync-ssl : 17 | http_client_sync_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/http/server/async-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe http-server-async-ssl : 17 | http_server_async_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/http/server/coro-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe http-server-coro-ssl : 17 | http_server_coro_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/http/server/sync-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe http-server-sync-ssl : 17 | http_server_sync_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/http/server/stackless-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe http-server-async-ssl : 17 | http_server_async_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/websocket/server/stackless/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/websocket/server/stackless "/") 12 | 13 | add_executable (websocket-server-stackless 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | websocket_server_stackless.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /example/http/client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (async) 11 | add_subdirectory (coro) 12 | add_subdirectory (crawl) 13 | add_subdirectory (sync) 14 | 15 | if (OPENSSL_FOUND) 16 | add_subdirectory (async-ssl) 17 | add_subdirectory (coro-ssl) 18 | add_subdirectory (sync-ssl) 19 | endif() 20 | -------------------------------------------------------------------------------- /example/http/client/crawl/urls_large_data.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_EXAMPLE_HTTP_CLIENT_CRAWL_URLS_LARGE_DATA_HPP 11 | #define BOOST_BEAST_EXAMPLE_HTTP_CLIENT_CRAWL_URLS_LARGE_DATA_HPP 12 | 13 | #include 14 | 15 | std::vector const& 16 | urls_large_data(); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /example/http/client/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | build-project async ; 11 | build-project coro ; 12 | build-project crawl ; 13 | build-project sync ; 14 | 15 | # VFALCO How do I make this work on Windows and if OpenSSL is not available? 16 | #build-project async-ssl ; 17 | #build-project coro-ssl ; 18 | #build-project sync-ssl ; 19 | -------------------------------------------------------------------------------- /example/websocket/client/async-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe websocket-client-async-ssl : 17 | websocket_client_async_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/websocket/client/coro-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe websocket-client-coro-ssl : 17 | websocket_client_coro_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/websocket/client/sync-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe websocket-client-sync-ssl : 17 | websocket_client_sync_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/websocket/server/async-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe websocket-server-async-ssl : 17 | websocket_server_async_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/websocket/server/coro-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe websocket-server-coro-ssl : 17 | websocket_server_coro_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/websocket/server/sync-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe websocket-server-sync-ssl : 17 | websocket_server_sync_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /example/http/client/crawl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/http/client/crawl "/") 12 | 13 | add_executable (http-crawl 14 | ${BOOST_BEAST_INCLUDES} 15 | Jamfile 16 | urls_large_data.hpp 17 | urls_large_data.cpp 18 | http_crawl.cpp 19 | ) 20 | 21 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/ada/zlib.gpr: -------------------------------------------------------------------------------- 1 | project Zlib is 2 | 3 | for Languages use ("Ada"); 4 | for Source_Dirs use ("."); 5 | for Object_Dir use "."; 6 | for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo"); 7 | 8 | package Compiler is 9 | for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst"); 10 | end Compiler; 11 | 12 | package Linker is 13 | for Default_Switches ("ada") use ("-lz"); 14 | end Linker; 15 | 16 | package Builder is 17 | for Default_Switches ("ada") use ("-s", "-gnatQ"); 18 | end Builder; 19 | 20 | end Zlib; 21 | -------------------------------------------------------------------------------- /example/websocket/server/stackless-ssl/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project 11 | : requirements 12 | ssl 13 | crypto 14 | ; 15 | 16 | exe websocket-server-stackless-ssl : 17 | websocket_server_stackless_ssl.cpp 18 | : 19 | coverage:no 20 | ubasan:no 21 | ; 22 | -------------------------------------------------------------------------------- /test/bench/buffers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(test/extras/include/boost/beast extras) 11 | GroupSources(include/boost/beast beast) 12 | GroupSources(test/bench/buffers "/") 13 | 14 | add_executable (bench-buffers 15 | ${BOOST_BEAST_INCLUDES} 16 | ${EXTRAS_INCLUDES} 17 | ${TEST_MAIN} 18 | Jamfile 19 | bench_buffers.cpp 20 | ) 21 | -------------------------------------------------------------------------------- /example/http/server/fast/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/http/server/fast "/") 13 | 14 | add_executable (http-server-fast 15 | ${BOOST_BEAST_INCLUDES} 16 | ${COMMON_INCLUDES} 17 | Jamfile 18 | fields_alloc.hpp 19 | http_server_fast.cpp 20 | ) 21 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/iostream/test.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "zfstream.h" 3 | 4 | int main() { 5 | 6 | // Construct a stream object with this filebuffer. Anything sent 7 | // to this stream will go to standard out. 8 | gzofstream os( 1, ios::out ); 9 | 10 | // This text is getting compressed and sent to stdout. 11 | // To prove this, run 'test | zcat'. 12 | os << "Hello, Mommy" << endl; 13 | 14 | os << setcompressionlevel( Z_NO_COMPRESSION ); 15 | os << "hello, hello, hi, ho!" << endl; 16 | 17 | setcompressionlevel( os, Z_DEFAULT_COMPRESSION ) 18 | << "I'm compressing again" << endl; 19 | 20 | os.close(); 21 | 22 | return 0; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /include/boost/beast/zlib.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_ZLIB_HPP 11 | #define BOOST_BEAST_ZLIB_HPP 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/boost/beast.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_HPP 11 | #define BOOST_BEAST_HPP 12 | 13 | #include // must come first 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /test/bench/utf8_checker/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(test/extras/include/boost/beast extras) 11 | GroupSources(include/boost/beast beast) 12 | GroupSources(test/bench/utf8_checker "/") 13 | 14 | add_executable (bench-utf8-checker 15 | ${BOOST_BEAST_INCLUDES} 16 | ${EXTRAS_INCLUDES} 17 | ${TEST_MAIN} 18 | Jamfile 19 | bench_utf8_checker.cpp 20 | ) 21 | -------------------------------------------------------------------------------- /example/websocket/server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (async) 11 | add_subdirectory (coro) 12 | add_subdirectory (fast) 13 | add_subdirectory (stackless) 14 | add_subdirectory (sync) 15 | 16 | if (OPENSSL_FOUND) 17 | add_subdirectory (async-ssl) 18 | add_subdirectory (coro-ssl) 19 | add_subdirectory (stackless-ssl) 20 | add_subdirectory (sync-ssl) 21 | endif() 22 | -------------------------------------------------------------------------------- /example/websocket/server/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | build-project async ; 11 | build-project coro ; 12 | build-project fast ; 13 | build-project stackless ; 14 | build-project sync ; 15 | 16 | # VFALCO How do I make this work on Windows and if OpenSSL is not available? 17 | #build-project async-ssl ; 18 | #build-project coro-ssl ; 19 | #build-project stackless-ssl ; 20 | #build-project sync-ssl ; 21 | -------------------------------------------------------------------------------- /test/bench/wsload/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(test/extras/include/boost/beast extras) 13 | GroupSources(test/bench/wsload "/") 14 | 15 | add_executable (bench-wsload 16 | ${BOOST_BEAST_INCLUDES} 17 | ${COMMON_INCLUDES} 18 | ${EXTRAS_INCLUDES} 19 | Jamfile 20 | wsload.cpp 21 | ) 22 | -------------------------------------------------------------------------------- /tools/make_field.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export LC_COLLATE=C 4 | 5 | echo "// string constants" 6 | echo ' "",' 7 | cat $1 | sort -f | uniq | sed 's/^/ \"/; s/$/\",/' 8 | echo 9 | 10 | echo "enum class field : unsigned short" 11 | echo "{" 12 | echo " unknown = 0," 13 | echo 14 | #cat $1 | uniq | sort -f | sed 's/./\L&/g; s/^/\t/; s/$/,/' 15 | cat $1 | sort -f | uniq | sed 's/\(.*\)/ \L\1,/; s/-/_/g' 16 | echo "};" 17 | echo 18 | 19 | echo "// pairs" 20 | #cat $1 | uniq | sort -f | sed 's/\(.*\)/\tmatch\(field::\L\1, \"\E\1\"\);/; s/-/_/' 21 | cat $1 | sort -f | uniq | perl -nE 'chomp; $a=lc($_); $a=~s/-/_/g; say " match(field::$a, \"$_\");";' | tr -d "\015" 22 | 23 | -------------------------------------------------------------------------------- /test/doc/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | alias run-tests : 11 | [ compile core_snippets.cpp ] 12 | [ compile http_snippets.cpp ] 13 | [ compile websocket_snippets.cpp ] 14 | [ run core_examples.cpp $(TEST_MAIN) ] 15 | [ run http_examples.cpp $(TEST_MAIN) ] 16 | ; 17 | 18 | exe fat-tests : 19 | $(TEST_MAIN) 20 | core_examples.cpp 21 | http_examples.cpp 22 | ; 23 | 24 | explicit fat-tests ; 25 | -------------------------------------------------------------------------------- /test/beast/zlib/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | local SOURCES = 11 | error.cpp 12 | deflate_stream.cpp 13 | inflate_stream.cpp 14 | ; 15 | 16 | local RUN_TESTS ; 17 | 18 | for local f in $(SOURCES) 19 | { 20 | RUN_TESTS += [ run $(f) $(TEST_MAIN) $(ZLIB_SOURCES) ] ; 21 | } 22 | 23 | alias run-tests : $(RUN_TESTS) ; 24 | 25 | exe fat-tests : $(TEST_MAIN) $(ZLIB_SOURCES) $(SOURCES) ; 26 | 27 | explicit fat-tests ; 28 | -------------------------------------------------------------------------------- /example/http/server/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | build-project async ; 11 | build-project coro ; 12 | build-project fast ; 13 | build-project small ; 14 | build-project stackless ; 15 | build-project sync ; 16 | 17 | # VFALCO How do I make this work on Windows and if OpenSSL is not available? 18 | #build-project async-ssl ; 19 | #build-project coro-ssl ; 20 | #build-project flex ; 21 | #build-project stackless-ssl ; 22 | #build-project sync-ssl ; 23 | -------------------------------------------------------------------------------- /include/boost/beast/websocket.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_WEBSOCKET_HPP 11 | #define BOOST_BEAST_WEBSOCKET_HPP 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /example/http/server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | add_subdirectory (async) 11 | add_subdirectory (coro) 12 | add_subdirectory (fast) 13 | add_subdirectory (small) 14 | add_subdirectory (stackless) 15 | add_subdirectory (sync) 16 | 17 | if (OPENSSL_FOUND) 18 | add_subdirectory (async-ssl) 19 | add_subdirectory (coro-ssl) 20 | add_subdirectory (flex) 21 | add_subdirectory (stackless-ssl) 22 | add_subdirectory (sync-ssl) 23 | endif() 24 | -------------------------------------------------------------------------------- /test/beast/http/empty_body.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | namespace boost { 14 | namespace beast { 15 | namespace http { 16 | 17 | BOOST_STATIC_ASSERT(is_body::value); 18 | BOOST_STATIC_ASSERT(is_body_reader::value); 19 | BOOST_STATIC_ASSERT(is_body_writer::value); 20 | 21 | } // http 22 | } // beast 23 | } // boost 24 | -------------------------------------------------------------------------------- /test/beast/http/string_body.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | namespace boost { 14 | namespace beast { 15 | namespace http { 16 | 17 | BOOST_STATIC_ASSERT(is_body::value); 18 | BOOST_STATIC_ASSERT(is_body_reader::value); 19 | BOOST_STATIC_ASSERT(is_body_writer::value); 20 | 21 | } // http 22 | } // beast 23 | } // boost 24 | -------------------------------------------------------------------------------- /test/example/common/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | local SOURCES = 11 | detect_ssl.cpp 12 | root_certificates.cpp 13 | server_certificate.cpp 14 | session_alloc.cpp 15 | ssl_stream.cpp 16 | write_msg.cpp 17 | ; 18 | 19 | local RUN_TESTS ; 20 | 21 | for local f in $(SOURCES) 22 | { 23 | RUN_TESTS += [ compile $(f) ] ; 24 | } 25 | 26 | alias run-tests : $(RUN_TESTS) ; 27 | 28 | alias build-fat : run-tests ; 29 | 30 | explicit build-fat ; 31 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Boost.Beast 4 | 5 | 6 | 7 | Automatic redirection failed, please go to 8 | ./doc/html/beast.html 9 |
10 | 11 | Boost.Beast
12 |
13 | Copyright (C) 2016-2017 Vinnie Falco
14 |
15 | Distributed under the Boost Software License, Version 1.0. 16 | (See accompanying file LICENSE_1_0.txt or copy at 17 | http://www.boost.org/LICENSE_1_0.txt)
18 |
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /include/boost/beast/core/detail/config.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_CORE_DETAIL_CONFIG_HPP 11 | #define BOOST_BEAST_CORE_DETAIL_CONFIG_HPP 12 | 13 | #include 14 | #include 15 | 16 | #if BOOST_VERSION >= 106500 || ! defined(BOOST_GCC) || BOOST_GCC < 70000 17 | # define BOOST_BEAST_FALLTHROUGH BOOST_FALLTHROUGH 18 | #else 19 | # define BOOST_BEAST_FALLTHROUGH __attribute__((fallthrough)) 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /test/beast/http/vector_body.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | namespace boost { 14 | namespace beast { 15 | namespace http { 16 | 17 | BOOST_STATIC_ASSERT(is_body>::value); 18 | BOOST_STATIC_ASSERT(is_body_reader>::value); 19 | BOOST_STATIC_ASSERT(is_body_writer>::value); 20 | 21 | } // http 22 | } // beast 23 | } // boost 24 | -------------------------------------------------------------------------------- /example/http/server/sync-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/http/server/sync-ssl "/") 13 | 14 | add_executable (http-server-sync-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 17 | Jamfile 18 | http_server_sync_ssl.cpp 19 | ) 20 | target_link_libraries (http-server-sync-ssl 21 | ${OPENSSL_LIBRARIES} 22 | ) 23 | -------------------------------------------------------------------------------- /example/http/client/coro-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/http/client/coro-ssl "/") 13 | 14 | add_executable (http-client-coro-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/root_certificates.hpp 17 | Jamfile 18 | http_client_coro_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (http-client-coro-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /example/http/client/sync-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/http/client/sync-ssl "/") 13 | 14 | add_executable (http-client-sync-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/root_certificates.hpp 17 | Jamfile 18 | http_client_sync_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (http-client-sync-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /example/http/server/coro-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/http/server/coro-ssl "/") 13 | 14 | add_executable (http-server-coro-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 17 | Jamfile 18 | http_server_coro_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (http-server-coro-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /example/http/client/async-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/http/client/async-ssl "/") 13 | 14 | add_executable (http-client-async-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/root_certificates.hpp 17 | Jamfile 18 | http_client_async_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (http-client-async-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /example/http/server/async-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/http/server/async-ssl "/") 13 | 14 | add_executable (http-server-async-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 17 | Jamfile 18 | http_server_async_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (http-server-async-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /example/http/server/stackless-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/http/server/stackless-ssl "/") 13 | 14 | add_executable (http-server-stackless-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 17 | Jamfile 18 | http_server_stackless_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (http-server-stackless-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /example/websocket/client/coro-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/websocket/client/coro-ssl "/") 13 | 14 | add_executable (websocket-client-coro-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/root_certificates.hpp 17 | Jamfile 18 | websocket_client_coro_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (websocket-client-coro-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /example/websocket/client/sync-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/websocket/client/sync-ssl "/") 13 | 14 | add_executable (websocket-client-sync-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/root_certificates.hpp 17 | Jamfile 18 | websocket_client_sync_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (websocket-client-sync-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /example/websocket/server/coro-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/websocket/server/coro-ssl "/") 13 | 14 | add_executable (websocket-server-coro-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 17 | Jamfile 18 | websocket_server_coro_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (websocket-server-coro-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /example/websocket/server/sync-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/websocket/server/sync-ssl "/") 13 | 14 | add_executable (websocket-server-sync-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 17 | Jamfile 18 | websocket_server_sync_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (websocket-server-sync-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /test/bench/parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(test/extras/include/boost/beast extras) 11 | GroupSources(include/boost/beast beast) 12 | GroupSources(test/beast/http "/") 13 | GroupSources(test/bench/parser "/") 14 | 15 | add_executable (bench-parser 16 | ${BOOST_BEAST_INCLUDES} 17 | ${EXTRAS_INCLUDES} 18 | ${TEST_MAIN} 19 | Jamfile 20 | ${PROJECT_SOURCE_DIR}/test/beast/http/message_fuzz.hpp 21 | nodejs_parser.hpp 22 | nodejs_parser.cpp 23 | bench_parser.cpp 24 | ) 25 | -------------------------------------------------------------------------------- /example/websocket/client/async-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/websocket/client/async-ssl "/") 13 | 14 | add_executable (websocket-client-async-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/root_certificates.hpp 17 | Jamfile 18 | websocket_client_async_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (websocket-client-async-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /example/websocket/server/async-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/websocket/server/async-ssl "/") 13 | 14 | add_executable (websocket-server-async-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 17 | Jamfile 18 | websocket_server_async_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (websocket-server-async-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /test/beast/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | alias run-tests : 11 | [ compile config.cpp ] 12 | [ compile core.cpp ] 13 | [ compile http.cpp ] 14 | [ compile version.cpp ] 15 | [ compile websocket.cpp ] 16 | [ compile zlib.cpp ] 17 | core//run-tests 18 | http//run-tests 19 | websocket//run-tests 20 | zlib//run-tests 21 | ; 22 | 23 | alias fat-tests : 24 | core//fat-tests 25 | http//fat-tests 26 | websocket//fat-tests 27 | zlib//fat-tests 28 | ; 29 | 30 | explicit fat-tests ; 31 | -------------------------------------------------------------------------------- /example/http/server/flex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/http/server/flex "/") 13 | 14 | add_executable (http-server-flex 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/detect_ssl.hpp 17 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 18 | Jamfile 19 | http_server_flex.cpp 20 | ) 21 | 22 | target_link_libraries (http-server-flex 23 | ${OPENSSL_LIBRARIES} 24 | ) 25 | -------------------------------------------------------------------------------- /test/doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(example example) 11 | GroupSources(test/extras/include/boost/beast extras) 12 | GroupSources(include/boost/beast beast) 13 | GroupSources(test/doc "/") 14 | 15 | add_executable (tests-doc 16 | ${BOOST_BEAST_INCLUDES} 17 | ${EXAMPLE_INCLUDES} 18 | ${EXTRAS_INCLUDES} 19 | ${TEST_MAIN} 20 | Jamfile 21 | core_examples.cpp 22 | core_snippets.cpp 23 | http_examples.cpp 24 | http_snippets.cpp 25 | websocket_snippets.cpp 26 | exemplars.cpp 27 | ) 28 | -------------------------------------------------------------------------------- /example/websocket/server/stackless-ssl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/websocket/server/stackless-ssl "/") 13 | 14 | add_executable (websocket-server-stackless-ssl 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 17 | Jamfile 18 | websocket_server_stackless_ssl.cpp 19 | ) 20 | 21 | target_link_libraries (websocket-server-stackless-ssl 22 | ${OPENSSL_LIBRARIES} 23 | ) 24 | -------------------------------------------------------------------------------- /test/example/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(example/common common) 11 | GroupSources(test/extras/include/boost/beast extras) 12 | GroupSources(include/boost/beast beast) 13 | GroupSources(test/example/common "/") 14 | 15 | add_executable (tests-example-common 16 | ${BOOST_BEAST_INCLUDES} 17 | ${COMMON_INCLUDES} 18 | Jamfile 19 | detect_ssl.cpp 20 | root_certificates.cpp 21 | server_certificate.cpp 22 | session_alloc.cpp 23 | ssl_stream.cpp 24 | write_msg.cpp 25 | main.cpp 26 | ) 27 | -------------------------------------------------------------------------------- /doc/qbk/07_concepts.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | Official repository: https://github.com/boostorg/beast 8 | ] 9 | 10 | [section:concepts Concepts] 11 | 12 | This section describes all of the concepts defined by the library. 13 | 14 | [include 07_concepts/Body.qbk] 15 | [include 07_concepts/BodyReader.qbk] 16 | [include 07_concepts/BodyWriter.qbk] 17 | [include 07_concepts/BufferSequence.qbk] 18 | [include 07_concepts/DynamicBuffer.qbk] 19 | [include 07_concepts/Fields.qbk] 20 | [include 07_concepts/FieldsReader.qbk] 21 | [include 07_concepts/File.qbk] 22 | [include 07_concepts/Streams.qbk] 23 | 24 | [endsect] 25 | -------------------------------------------------------------------------------- /test/beast/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(test/extras/include/boost/beast extras) 12 | GroupSources(test/beast "/") 13 | 14 | add_executable (tests-beast 15 | ${BOOST_BEAST_INCLUDES} 16 | ${EXTRAS_INCLUDES} 17 | ${TEST_MAIN} 18 | Jamfile 19 | config.cpp 20 | core.cpp 21 | http.cpp 22 | version.cpp 23 | websocket.cpp 24 | zlib.cpp 25 | ) 26 | 27 | add_subdirectory (core) 28 | add_subdirectory (http) 29 | add_subdirectory (websocket) 30 | add_subdirectory (zlib) 31 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/iostream2/zstream_test.cpp: -------------------------------------------------------------------------------- 1 | #include "zstream.h" 2 | #include 3 | #include 4 | #include 5 | 6 | void main() { 7 | char h[256] = "Hello"; 8 | char* g = "Goodbye"; 9 | ozstream out("temp.gz"); 10 | out < "This works well" < h < g; 11 | out.close(); 12 | 13 | izstream in("temp.gz"); // read it back 14 | char *x = read_string(in), *y = new char[256], z[256]; 15 | in > y > z; 16 | in.close(); 17 | cout << x << endl << y << endl << z << endl; 18 | 19 | out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results 20 | out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl; 21 | out << z << endl << y << endl << x << endl; 22 | out << 1.1234567890123456789 << endl; 23 | 24 | delete[] x; delete[] y; 25 | } 26 | -------------------------------------------------------------------------------- /doc/xsl/includes_foot.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Convenience header [include_file boost/beast/core.hpp] 5 | 6 | 7 | Convenience header [include_file boost/beast/http.hpp] 8 | 9 | 10 | Convenience header [include_file boost/beast/websocket.hpp] 11 | 12 | 13 | Convenience header [include_file boost/beast/zlib.hpp] 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test/bench/zlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(test/extras/include/boost/beast extras) 12 | GroupSources(test/extern/zlib-1.2.11 zlib) 13 | GroupSources(test/bench/zlib "/") 14 | 15 | if (MSVC) 16 | set_source_files_properties (${ZLIB_SOURCES} PROPERTIES COMPILE_FLAGS "/wd4127 /wd4131 /wd4244") 17 | endif() 18 | 19 | add_executable (bench-zlib 20 | ${BOOST_BEAST_INCLUDES} 21 | ${EXTRAS_INCLUDES} 22 | ${ZLIB_SOURCES} 23 | ${TEST_MAIN} 24 | Jamfile 25 | deflate_stream.cpp 26 | inflate_stream.cpp 27 | ) 28 | -------------------------------------------------------------------------------- /include/boost/beast/http/dynamic_body.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_HTTP_DYNAMIC_BODY_HPP 11 | #define BOOST_BEAST_HTTP_DYNAMIC_BODY_HPP 12 | 13 | #include 14 | #include 15 | 16 | namespace boost { 17 | namespace beast { 18 | namespace http { 19 | 20 | /** A dynamic message body represented by a @ref multi_buffer 21 | 22 | Meets the requirements of @b Body. 23 | */ 24 | using dynamic_body = basic_dynamic_body; 25 | 26 | } // http 27 | } // beast 28 | } // boost 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/boost/beast/version.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_VERSION_HPP 11 | #define BOOST_BEAST_VERSION_HPP 12 | 13 | #include 14 | #include 15 | 16 | /** @def BOOST_BEAST_API_VERSION 17 | 18 | Identifies the API version of Beast. 19 | 20 | This is a simple integer that is incremented by one every 21 | time a set of code changes is merged to the develop branch. 22 | */ 23 | #define BOOST_BEAST_VERSION 116 24 | 25 | #define BOOST_BEAST_VERSION_STRING "Boost.Beast/" BOOST_STRINGIZE(BOOST_BEAST_VERSION) 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/minizip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /example/advanced/server-flex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(example/common common) 12 | GroupSources(example/advanced/server-flex "/") 13 | 14 | add_executable (advanced-server-flex 15 | ${BOOST_BEAST_INCLUDES} 16 | ${PROJECT_SOURCE_DIR}/example/common/detect_ssl.hpp 17 | ${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp 18 | ${PROJECT_SOURCE_DIR}/example/common/ssl_stream.hpp 19 | Jamfile 20 | advanced_server_flex.cpp 21 | ) 22 | 23 | target_link_libraries (advanced-server-flex 24 | ${OPENSSL_LIBRARIES} 25 | ) 26 | -------------------------------------------------------------------------------- /test/beast/zlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(include/boost/beast beast) 11 | GroupSources(test/extras/include/boost/beast extras) 12 | GroupSources(test/extern/zlib-1.2.11 zlib) 13 | GroupSources(test/beast/zlib "/") 14 | 15 | if (MSVC) 16 | set_source_files_properties (${ZLIB_SOURCES} PROPERTIES COMPILE_FLAGS "/wd4127 /wd4131 /wd4244") 17 | endif() 18 | 19 | add_executable (tests-beast-zlib 20 | ${BOOST_BEAST_INCLUDES} 21 | ${EXTRAS_INCLUDES} 22 | ${ZLIB_SOURCES} 23 | ${TEST_MAIN} 24 | Jamfile 25 | error.cpp 26 | deflate_stream.cpp 27 | inflate_stream.cpp 28 | ) 29 | -------------------------------------------------------------------------------- /test/beast/websocket/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | local SOURCES = 11 | accept.cpp 12 | close.cpp 13 | error.cpp 14 | frame.cpp 15 | handshake.cpp 16 | mask.cpp 17 | option.cpp 18 | ping.cpp 19 | read.cpp 20 | rfc6455.cpp 21 | role.cpp 22 | stream.cpp 23 | teardown.cpp 24 | utf8_checker.cpp 25 | write.cpp 26 | ; 27 | 28 | local RUN_TESTS ; 29 | 30 | for local f in $(SOURCES) 31 | { 32 | RUN_TESTS += [ run $(f) $(TEST_MAIN) ] ; 33 | } 34 | 35 | alias run-tests : $(RUN_TESTS) ; 36 | 37 | exe fat-tests : $(TEST_MAIN) $(SOURCES) ; 38 | 39 | explicit fat-tests ; 40 | -------------------------------------------------------------------------------- /test/beast/websocket/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(test/extras/include/boost/beast extras) 11 | GroupSources(include/boost/beast beast) 12 | GroupSources(test/beast/websocket "/") 13 | 14 | add_executable (tests-beast-websocket 15 | ${BOOST_BEAST_INCLUDES} 16 | ${EXTRAS_INCLUDES} 17 | ${TEST_MAIN} 18 | Jamfile 19 | test.hpp 20 | accept.cpp 21 | close.cpp 22 | error.cpp 23 | frame.cpp 24 | handshake.cpp 25 | mask.cpp 26 | option.cpp 27 | ping.cpp 28 | read.cpp 29 | rfc6455.cpp 30 | role.cpp 31 | stream.cpp 32 | teardown.cpp 33 | utf8_checker.cpp 34 | write.cpp 35 | ) 36 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/minizip/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_INIT([minizip], [1.2.11], [bugzilla.redhat.com]) 5 | AC_CONFIG_SRCDIR([minizip.c]) 6 | AM_INIT_AUTOMAKE([foreign]) 7 | LT_INIT 8 | 9 | AC_MSG_CHECKING([whether to build example programs]) 10 | AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs])) 11 | AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes]) 12 | if test "$enable_demos" = yes 13 | then 14 | AC_MSG_RESULT([yes]) 15 | else 16 | AC_MSG_RESULT([no]) 17 | fi 18 | 19 | case "${host}" in 20 | *-mingw* | mingw*) 21 | WIN32="yes" 22 | ;; 23 | *) 24 | ;; 25 | esac 26 | AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) 27 | 28 | 29 | AC_SUBST([HAVE_UNISTD_H], [0]) 30 | AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], []) 31 | AC_CONFIG_FILES([Makefile minizip.pc]) 32 | AC_OUTPUT 33 | -------------------------------------------------------------------------------- /test/bench/parser/nodejs_parser.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #if defined(__GNUC__) && (__GNUC__ >= 7) 11 | #pragma GCC diagnostic push 12 | #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" 13 | #endif 14 | 15 | #include 16 | 17 | #ifdef BOOST_MSVC 18 | # pragma warning (push) 19 | # pragma warning (disable: 4127) // conditional expression is constant 20 | # pragma warning (disable: 4244) // integer conversion, possible loss of data 21 | #endif 22 | 23 | #include "nodejs-parser/http_parser.c" 24 | 25 | #ifdef BOOST_MSVC 26 | # pragma warning (pop) 27 | #endif 28 | 29 | #if defined(__GNUC__) && (__GNUC__ >= 7) 30 | #pragma GCC diagnostic pop 31 | #endif 32 | -------------------------------------------------------------------------------- /test/beast/http/type_traits.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | namespace boost { 17 | namespace beast { 18 | namespace http { 19 | 20 | BOOST_STATIC_ASSERT(! is_body_reader::value); 21 | 22 | BOOST_STATIC_ASSERT(is_body_reader::value); 23 | 24 | BOOST_STATIC_ASSERT(! is_body_writer::value); 25 | 26 | namespace { 27 | 28 | struct not_fields {}; 29 | 30 | } // (anonymous) 31 | 32 | BOOST_STATIC_ASSERT(! is_fields::value); 33 | 34 | } // http 35 | } // beast 36 | } // boost 37 | -------------------------------------------------------------------------------- /test/extras/include/boost/beast/test/sig_wait.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_TEST_SIG_WAIT_HPP 11 | #define BOOST_BEAST_TEST_SIG_WAIT_HPP 12 | 13 | #include 14 | 15 | namespace boost { 16 | namespace beast { 17 | namespace test { 18 | 19 | /// Block until SIGINT or SIGTERM is received. 20 | inline 21 | void 22 | sig_wait() 23 | { 24 | boost::asio::io_service ios; 25 | boost::asio::signal_set signals( 26 | ios, SIGINT, SIGTERM); 27 | signals.async_wait( 28 | [&](boost::system::error_code const&, int) 29 | { 30 | }); 31 | ios.run(); 32 | } 33 | 34 | } // test 35 | } // beast 36 | } // boost 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/masmx86/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | Summary 3 | ------- 4 | This directory contains ASM implementations of the functions 5 | longest_match() and inflate_fast(). 6 | 7 | 8 | Use instructions 9 | ---------------- 10 | Assemble using MASM, and copy the object files into the zlib source 11 | directory, then run the appropriate makefile, as suggested below. You can 12 | donwload MASM from here: 13 | 14 | http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 15 | 16 | You can also get objects files here: 17 | 18 | http://www.winimage.com/zLibDll/zlib124_masm_obj.zip 19 | 20 | Build instructions 21 | ------------------ 22 | * With Microsoft C and MASM: 23 | nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" 24 | 25 | * With Borland C and TASM: 26 | make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" 27 | 28 | -------------------------------------------------------------------------------- /test/beast/core/file_stdio.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | #include "file_test.hpp" 14 | 15 | #include 16 | #include 17 | 18 | namespace boost { 19 | namespace beast { 20 | 21 | BOOST_STATIC_ASSERT(! std::is_copy_constructible::value); 22 | 23 | class file_stdio_test 24 | : public beast::unit_test::suite 25 | { 26 | public: 27 | void 28 | run() 29 | { 30 | doTestFile(*this); 31 | } 32 | }; 33 | 34 | BEAST_DEFINE_TESTSUITE(beast,core,file_stdio); 35 | 36 | } // beast 37 | } // boost 38 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/minizip/iowin32.h: -------------------------------------------------------------------------------- 1 | /* iowin32.h -- IO base function header for compress/uncompress .zip 2 | Version 1.1, February 14h, 2010 3 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) 4 | 5 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) 6 | 7 | Modifications for Zip64 support 8 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) 9 | 10 | For more info read MiniZip_info.txt 11 | 12 | */ 13 | 14 | #include 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); 22 | void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def)); 23 | void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def)); 24 | void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def)); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | PLEASE DON'T FORGET TO "STAR" THIS REPOSITORY :) 2 | 3 | If you rather keep your project secret, feel free 4 | to email the author at ``; any 5 | private correspondence is treated as confidential. 6 | 7 | When reporting a bug please include the following: 8 | 9 | ### Version of Beast 10 | 11 | You can find the version number in the file ``, 12 | or by using the command "git log -1" in the local Beast repository 13 | directory. 14 | 15 | ### Steps necessary to reproduce the problem 16 | 17 | A small compiling program is the best. If your code is 18 | public, you can provide a link to the repository. 19 | 20 | ### All relevant compiler information 21 | 22 | If you are unable to compile please include the type and 23 | version of compiler you are using as well as all compiler 24 | output including the error message, file, and line numbers 25 | involved. 26 | 27 | The more information you provide the sooner your issue 28 | can get resolved! 29 | -------------------------------------------------------------------------------- /include/boost/beast/http/file_body.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_HTTP_FILE_BODY_HPP 11 | #define BOOST_BEAST_HTTP_FILE_BODY_HPP 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | namespace boost { 23 | namespace beast { 24 | namespace http { 25 | 26 | /// A message body represented by a file on the filesystem. 27 | using file_body = basic_file_body; 28 | 29 | } // http 30 | } // beast 31 | } // boost 32 | 33 | #include 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | EndGlobalSection 11 | GlobalSection(ProjectConfiguration) = postSolution 12 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET 13 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET 14 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET 15 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET 16 | EndGlobalSection 17 | GlobalSection(ExtensibilityGlobals) = postSolution 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityAddIns) = postSolution 20 | EndGlobalSection 21 | EndGlobal 22 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/old/os2/zlib.def: -------------------------------------------------------------------------------- 1 | ; 2 | ; Slightly modified version of ../nt/zlib.dnt :-) 3 | ; 4 | 5 | LIBRARY Z 6 | DESCRIPTION "Zlib compression library for OS/2" 7 | CODE PRELOAD MOVEABLE DISCARDABLE 8 | DATA PRELOAD MOVEABLE MULTIPLE 9 | 10 | EXPORTS 11 | adler32 12 | compress 13 | crc32 14 | deflate 15 | deflateCopy 16 | deflateEnd 17 | deflateInit2_ 18 | deflateInit_ 19 | deflateParams 20 | deflateReset 21 | deflateSetDictionary 22 | gzclose 23 | gzdopen 24 | gzerror 25 | gzflush 26 | gzopen 27 | gzread 28 | gzwrite 29 | inflate 30 | inflateEnd 31 | inflateInit2_ 32 | inflateInit_ 33 | inflateReset 34 | inflateSetDictionary 35 | inflateSync 36 | uncompress 37 | zlibVersion 38 | gzprintf 39 | gzputc 40 | gzgetc 41 | gzseek 42 | gzrewind 43 | gztell 44 | gzeof 45 | gzsetparams 46 | zError 47 | inflateSyncPoint 48 | get_crc_table 49 | compress2 50 | gzputs 51 | gzgets 52 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/minizip/make_vms.com: -------------------------------------------------------------------------------- 1 | $ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig 2 | $ open/write zdef vmsdefs.h 3 | $ copy sys$input: zdef 4 | $ deck 5 | #define unix 6 | #define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from 7 | #define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator 8 | #define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord 9 | #define Write_EndOfCentralDirectoryRecord Write_EoDRecord 10 | $ eod 11 | $ close zdef 12 | $ copy vmsdefs.h,ioapi.h_orig ioapi.h 13 | $ cc/include=[--]/prefix=all ioapi.c 14 | $ cc/include=[--]/prefix=all miniunz.c 15 | $ cc/include=[--]/prefix=all unzip.c 16 | $ cc/include=[--]/prefix=all minizip.c 17 | $ cc/include=[--]/prefix=all zip.c 18 | $ link miniunz,unzip,ioapi,[--]libz.olb/lib 19 | $ link minizip,zip,ioapi,[--]libz.olb/lib 20 | $ mcr []minizip test minizip_info.txt 21 | $ mcr []miniunz -l test.zip 22 | $ rename minizip_info.txt; minizip_info.txt_old 23 | $ mcr []miniunz test.zip 24 | $ delete test.zip;* 25 | $exit 26 | -------------------------------------------------------------------------------- /doc/docca/example/main.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | ] 7 | 8 | [library docca 9 | [quickbook 1.6] 10 | [copyright 2016 Vinnie Falco] 11 | [purpose Documentation Library] 12 | [license 13 | Distributed under the Boost Software License, Version 1.0. 14 | (See accompanying file LICENSE_1_0.txt or copy at 15 | [@http://www.boost.org/LICENSE_1_0.txt]) 16 | ] 17 | [category template] 18 | [category generic] 19 | ] 20 | 21 | [template mdash[] '''— '''] 22 | [template indexterm1[term1] ''''''[term1]''''''] 23 | [template indexterm2[term1 term2] ''''''[term1]''''''[term2]''''''] 24 | 25 | [section:ref Reference] 26 | [include reference.qbk] 27 | [endsect] 28 | [xinclude index.xml] 29 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {048af943-022b-4db6-beeb-a54c34774ee2} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {0844199a-966b-4f19-81db-1e0125e141b9} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {c0419b40-bf50-40da-b153-ff74215b79de} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {bb87b070-735b-478e-92ce-7383abb2f36c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {f46ab6a6-548f-43cb-ae96-681abb5bd5db} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/minizip/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libminizip.la 2 | 3 | if COND_DEMOS 4 | bin_PROGRAMS = miniunzip minizip 5 | endif 6 | 7 | zlib_top_srcdir = $(top_srcdir)/../.. 8 | zlib_top_builddir = $(top_builddir)/../.. 9 | 10 | AM_CPPFLAGS = -I$(zlib_top_srcdir) 11 | AM_LDFLAGS = -L$(zlib_top_builddir) 12 | 13 | if WIN32 14 | iowin32_src = iowin32.c 15 | iowin32_h = iowin32.h 16 | endif 17 | 18 | libminizip_la_SOURCES = \ 19 | ioapi.c \ 20 | mztools.c \ 21 | unzip.c \ 22 | zip.c \ 23 | ${iowin32_src} 24 | 25 | libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz 26 | 27 | minizip_includedir = $(includedir)/minizip 28 | minizip_include_HEADERS = \ 29 | crypt.h \ 30 | ioapi.h \ 31 | mztools.h \ 32 | unzip.h \ 33 | zip.h \ 34 | ${iowin32_h} 35 | 36 | pkgconfigdir = $(libdir)/pkgconfig 37 | pkgconfig_DATA = minizip.pc 38 | 39 | EXTRA_PROGRAMS = miniunzip minizip 40 | 41 | miniunzip_SOURCES = miniunz.c 42 | miniunzip_LDADD = libminizip.la 43 | 44 | minizip_SOURCES = minizip.c 45 | minizip_LDADD = libminizip.la -lz 46 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {fa61a89f-93fc-4c89-b29e-36224b7592f4} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {d4b85da0-2ba2-4934-b57f-e2584e3848ee} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/beast/core/file_posix.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | #if BOOST_BEAST_USE_POSIX_FILE 14 | 15 | #include "file_test.hpp" 16 | 17 | #include 18 | #include 19 | 20 | namespace boost { 21 | namespace beast { 22 | 23 | BOOST_STATIC_ASSERT(! std::is_copy_constructible::value); 24 | 25 | class file_posix_test 26 | : public beast::unit_test::suite 27 | { 28 | public: 29 | void 30 | run() 31 | { 32 | doTestFile(*this); 33 | } 34 | }; 35 | 36 | BEAST_DEFINE_TESTSUITE(beast,core,file_posix); 37 | 38 | } // beast 39 | } // boost 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /test/beast/core/file_win32.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | #if BOOST_BEAST_USE_WIN32_FILE 14 | 15 | #include "file_test.hpp" 16 | 17 | #include 18 | #include 19 | 20 | namespace boost { 21 | namespace beast { 22 | 23 | BOOST_STATIC_ASSERT(! std::is_copy_constructible::value); 24 | 25 | class file_win32_test 26 | : public beast::unit_test::suite 27 | { 28 | public: 29 | void 30 | run() 31 | { 32 | doTestFile(*this); 33 | } 34 | }; 35 | 36 | BEAST_DEFINE_TESTSUITE(beast,core,file_win32); 37 | 38 | } // beast 39 | } // boost 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /doc/qbk/07_concepts/Streams.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | Official repository: https://github.com/boostorg/beast 8 | ] 9 | 10 | [section:streams Streams] 11 | 12 | Stream types represent objects capable of performing synchronous or 13 | asynchronous I/O. They are based on concepts from `boost::asio`. 14 | 15 | [heading:Stream Stream] 16 | 17 | A type modeling [*Stream] meets either or both of the following requirements: 18 | 19 | * [*AsyncStream] 20 | * [*SyncStream] 21 | 22 | [heading:AsyncStream AsyncStream] 23 | 24 | A type modeling [*AsyncStream] meets the following requirements: 25 | 26 | * __AsyncReadStream__ 27 | * __AsyncWriteStream__ 28 | 29 | [heading:SyncStream SyncStream] 30 | 31 | A type modeling [*SyncStream] meets the following requirements: 32 | 33 | * __SyncReadStream__ 34 | * __SyncWriteStream__ 35 | 36 | [endsect] 37 | -------------------------------------------------------------------------------- /test/beast/core/clamp.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | namespace boost { 17 | namespace beast { 18 | namespace detail { 19 | 20 | class clamp_test : public beast::unit_test::suite 21 | { 22 | public: 23 | void testClamp() 24 | { 25 | BEAST_EXPECT(clamp( 26 | (std::numeric_limits::max)()) == 27 | (std::numeric_limits::max)()); 28 | } 29 | 30 | void run() override 31 | { 32 | testClamp(); 33 | } 34 | }; 35 | 36 | BEAST_DEFINE_TESTSUITE(beast,core,clamp); 37 | 38 | } // detail 39 | } // beast 40 | } // boost 41 | -------------------------------------------------------------------------------- /include/boost/beast/websocket/detail/type_traits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_WEBSOCKET_DETAIL_TYPE_TRAITS_HPP 11 | #define BOOST_BEAST_WEBSOCKET_DETAIL_TYPE_TRAITS_HPP 12 | 13 | #include 14 | #include 15 | 16 | namespace boost { 17 | namespace beast { 18 | namespace websocket { 19 | namespace detail { 20 | 21 | template 22 | using is_RequestDecorator = 23 | typename beast::detail::is_invocable::type; 25 | 26 | template 27 | using is_ResponseDecorator = 28 | typename beast::detail::is_invocable::type; 30 | 31 | } // detail 32 | } // websocket 33 | } // beast 34 | } // boost 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/vstudio/vc10/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/vstudio/vc11/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/vstudio/vc12/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/vstudio/vc14/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/vstudio/vc9/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /test/beast/http/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | local SOURCES = 11 | basic_dynamic_body.cpp 12 | basic_file_body.cpp 13 | basic_parser.cpp 14 | buffer_body.cpp 15 | chunk_encode.cpp 16 | dynamic_body.cpp 17 | error.cpp 18 | field.cpp 19 | fields.cpp 20 | file_body.cpp 21 | message.cpp 22 | parser.cpp 23 | read.cpp 24 | rfc7230.cpp 25 | serializer.cpp 26 | span_body.cpp 27 | status.cpp 28 | string_body.cpp 29 | type_traits.cpp 30 | vector_body.cpp 31 | verb.cpp 32 | write.cpp 33 | ; 34 | 35 | local RUN_TESTS ; 36 | 37 | for local f in $(SOURCES) 38 | { 39 | RUN_TESTS += [ run $(f) $(TEST_MAIN) ] ; 40 | } 41 | 42 | alias run-tests : $(RUN_TESTS) ; 43 | 44 | exe fat-tests : $(TEST_MAIN) $(SOURCES) ; 45 | 46 | explicit fat-tests ; 47 | -------------------------------------------------------------------------------- /include/boost/beast/websocket/error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_WEBSOCKET_ERROR_HPP 11 | #define BOOST_BEAST_WEBSOCKET_ERROR_HPP 12 | 13 | #include 14 | #include 15 | 16 | namespace boost { 17 | namespace beast { 18 | namespace websocket { 19 | 20 | /// Error codes returned from @ref beast::websocket::stream operations. 21 | enum class error 22 | { 23 | /// Both sides performed a WebSocket close 24 | closed = 1, 25 | 26 | /// WebSocket connection failed, protocol violation 27 | failed, 28 | 29 | /// Upgrade handshake failed 30 | handshake_failed, 31 | 32 | /// buffer overflow 33 | buffer_overflow 34 | }; 35 | 36 | } // websocket 37 | } // beast 38 | } // boost 39 | 40 | #include 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /doc/qbk/06_websocket/2_connect.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | Official repository: https://github.com/boostorg/beast 8 | ] 9 | 10 | [section Establishing Connections] 11 | 12 | Connections are established by invoking functions directly on the next layer 13 | object. For example, to make an outgoing connection using a standard TCP/IP 14 | socket: 15 | 16 | [ws_snippet_6] 17 | 18 | Similarly, to accept an incoming connection using a standard TCP/IP 19 | socket, pass the next layer object to the acceptor: 20 | 21 | [ws_snippet_7] 22 | 23 | When using SSL, which itself wraps a next layer object that is usually a 24 | TCP/IP socket, multiple calls to retrieve the next layer may be required. 25 | In this example, the websocket stream wraps the SSL stream which wraps 26 | the TCP/IP socket: 27 | 28 | [wss_snippet_3] 29 | 30 | [note 31 | Examples use synchronous interfaces for clarity of exposition. 32 | ] 33 | 34 | [endsect] 35 | -------------------------------------------------------------------------------- /include/boost/beast/core/detail/allocator.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_DETAIL_ALLOCATOR_HPP 11 | #define BOOST_BEAST_DETAIL_ALLOCATOR_HPP 12 | 13 | #include 14 | #if BOOST_NO_CXX11_ALLOCATOR 15 | #include 16 | #else 17 | #include 18 | #endif 19 | 20 | namespace boost { 21 | namespace beast { 22 | namespace detail { 23 | 24 | // This is a workaround for allocator_traits 25 | // implementations which falsely claim C++11 26 | // compatibility. 27 | 28 | #if BOOST_NO_CXX11_ALLOCATOR 29 | template 30 | using allocator_traits = boost::container::allocator_traits; 31 | 32 | #else 33 | template 34 | using allocator_traits = std::allocator_traits; 35 | 36 | #endif 37 | 38 | } // detail 39 | } // beast 40 | } // boost 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /test/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | project /boost/beast/test 11 | : requirements 12 | ./extern 13 | ; 14 | 15 | path-constant ZLIB_SOURCES : 16 | extern/zlib-1.2.11/adler32.c 17 | extern/zlib-1.2.11/compress.c 18 | extern/zlib-1.2.11/crc32.c 19 | extern/zlib-1.2.11/deflate.c 20 | extern/zlib-1.2.11/infback.c 21 | extern/zlib-1.2.11/inffast.c 22 | extern/zlib-1.2.11/inflate.c 23 | extern/zlib-1.2.11/inftrees.c 24 | extern/zlib-1.2.11/trees.c 25 | extern/zlib-1.2.11/uncompr.c 26 | extern/zlib-1.2.11/zutil.c 27 | ; 28 | 29 | alias run-tests : 30 | beast//run-tests 31 | bench//run-tests 32 | doc//run-tests 33 | example//run-tests 34 | ; 35 | 36 | alias fat-tests : 37 | beast//fat-tests 38 | doc//fat-tests 39 | example//fat-tests 40 | ; 41 | 42 | explicit fat-tests ; 43 | -------------------------------------------------------------------------------- /include/boost/beast/websocket/impl/rfc6455.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_WEBSOCKET_IMPL_RFC6455_IPP 11 | #define BOOST_BEAST_WEBSOCKET_IMPL_RFC6455_IPP 12 | 13 | #include 14 | #include 15 | 16 | namespace boost { 17 | namespace beast { 18 | namespace websocket { 19 | 20 | template 21 | bool 22 | is_upgrade(http::header> const& req) 24 | { 25 | if(req.version() < 11) 26 | return false; 27 | if(req.method() != http::verb::get) 28 | return false; 29 | if(! http::token_list{req["Connection"]}.exists("upgrade")) 30 | return false; 31 | if(! http::token_list{req["Upgrade"]}.exists("websocket")) 32 | return false; 33 | return true; 34 | } 35 | 36 | } // websocket 37 | } // beast 38 | } // boost 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /test/beast/http/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(test/extras/include/boost/beast extras) 11 | GroupSources(include/boost/beast beast) 12 | GroupSources(test/beast/http "/") 13 | 14 | add_executable (tests-beast-http 15 | ${BOOST_BEAST_INCLUDES} 16 | ${EXTRAS_INCLUDES} 17 | ${TEST_MAIN} 18 | Jamfile 19 | message_fuzz.hpp 20 | test_parser.hpp 21 | basic_dynamic_body.cpp 22 | basic_file_body.cpp 23 | basic_parser.cpp 24 | buffer_body.cpp 25 | chunk_encode.cpp 26 | dynamic_body.cpp 27 | empty_body.cpp 28 | error.cpp 29 | field.cpp 30 | fields.cpp 31 | file_body.cpp 32 | message.cpp 33 | parser.cpp 34 | read.cpp 35 | rfc7230.cpp 36 | serializer.cpp 37 | span_body.cpp 38 | status.cpp 39 | string_body.cpp 40 | type_traits.cpp 41 | vector_body.cpp 42 | verb.cpp 43 | write.cpp 44 | ) 45 | -------------------------------------------------------------------------------- /include/boost/beast/core/detail/in_place_init.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_DETAIL_IN_PLACE_INIT_HPP 11 | #define BOOST_BEAST_DETAIL_IN_PLACE_INIT_HPP 12 | 13 | #include 14 | #include 15 | 16 | // Provide boost::in_place_init_t and boost::in_place_init 17 | // for Boost versions earlier than 1.63.0. 18 | 19 | #if BOOST_VERSION < 106300 20 | 21 | namespace boost { 22 | 23 | namespace optional_ns { 24 | 25 | // a tag for in-place initialization of contained value 26 | struct in_place_init_t 27 | { 28 | struct init_tag{}; 29 | explicit in_place_init_t(init_tag){} 30 | }; 31 | const in_place_init_t in_place_init ((in_place_init_t::init_tag())); 32 | 33 | } // namespace optional_ns 34 | 35 | using optional_ns::in_place_init_t; 36 | using optional_ns::in_place_init; 37 | 38 | } 39 | 40 | #endif 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /include/boost/beast/core/file.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015-2016 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_CORE_FILE_HPP 11 | #define BOOST_BEAST_CORE_FILE_HPP 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | namespace boost { 21 | namespace beast { 22 | 23 | /** An implementation of File. 24 | 25 | This alias is set to the best available implementation 26 | of @b File given the platform and build settings. 27 | */ 28 | #if BOOST_BEAST_DOXYGEN 29 | struct file : file_stdio 30 | { 31 | }; 32 | #else 33 | #if BOOST_BEAST_USE_WIN32_FILE 34 | using file = file_win32; 35 | #elif BOOST_BEAST_USE_POSIX_FILE 36 | using file = file_posix; 37 | #else 38 | using file = file_stdio; 39 | #endif 40 | #endif 41 | 42 | } // beast 43 | } // boost 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /doc/qbk/03_core.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | Official repository: https://github.com/boostorg/beast 8 | ] 9 | 10 | [section:using_io Using I/O] 11 | 12 | This library makes I/O primitives used by the implementation publicly 13 | available so users can take advantage of them in their own libraries. 14 | These primitives include traits, buffers, buffer algorithms, files, 15 | and helpers for implementing asynchronous operations compatible with 16 | __Asio__ and described in __N3747__. This section lists these facilities 17 | by group, with descriptions. 18 | 19 | [important 20 | This documentation assumes familiarity with __Asio__. Sample 21 | code and identifiers used throughout are written as if the 22 | following declarations are in effect: 23 | 24 | [snippet_core_1a] 25 | [snippet_core_1b] 26 | ] 27 | 28 | [include 03_core/1_asio.qbk] 29 | [include 03_core/2_streams.qbk] 30 | [include 03_core/3_buffers.qbk] 31 | [include 03_core/4_files.qbk] 32 | [include 03_core/5_composed.qbk] 33 | [include 03_core/6_detect_ssl.qbk] 34 | 35 | [endsect] 36 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/DotZLib.build: -------------------------------------------------------------------------------- 1 | 2 | 3 | A .Net wrapper library around ZLib1.dll 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/extras/include/boost/beast/test/throughput.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_TEST_THROUGHPUT_HPP 11 | #define BOOST_BEAST_TEST_THROUGHPUT_HPP 12 | 13 | #include 14 | #include 15 | 16 | namespace boost { 17 | namespace beast { 18 | namespace test { 19 | 20 | class timer 21 | { 22 | using clock_type = 23 | std::chrono::system_clock; 24 | 25 | clock_type::time_point when_; 26 | 27 | public: 28 | using duration = 29 | clock_type::duration; 30 | 31 | timer() 32 | : when_(clock_type::now()) 33 | { 34 | } 35 | 36 | duration 37 | elapsed() const 38 | { 39 | return clock_type::now() - when_; 40 | } 41 | }; 42 | 43 | inline 44 | std::uint64_t 45 | throughput(std::chrono::duration< 46 | double> const& elapsed, std::uint64_t items) 47 | { 48 | using namespace std::chrono; 49 | return static_cast( 50 | 1 / (elapsed/items).count()); 51 | } 52 | 53 | } // test 54 | } // beast 55 | } // boost 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /test/bench/parser/nodejs-parser/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright 2 | Igor Sysoev. 3 | 4 | Additional changes are licensed under the same terms as NGINX and 5 | copyright Joyent, Inc. and other Node contributors. All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to 9 | deal in the Software without restriction, including without limitation the 10 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11 | sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 23 | IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/masmx64/readme.txt: -------------------------------------------------------------------------------- 1 | Summary 2 | ------- 3 | This directory contains ASM implementations of the functions 4 | longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t), 5 | for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits. 6 | 7 | gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits 8 | assembly optimized version from Jean-loup Gailly original longest_match function 9 | 10 | inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing 11 | original function from Mark Adler 12 | 13 | Use instructions 14 | ---------------- 15 | Assemble the .asm files using MASM and put the object files into the zlib source 16 | directory. You can also get object files here: 17 | 18 | http://www.winimage.com/zLibDll/zlib124_masm_obj.zip 19 | 20 | define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, 21 | and inffasx64.obj and gvmat64.obj as object to link. 22 | 23 | 24 | Build instructions 25 | ------------------ 26 | run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe) 27 | 28 | ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK 29 | 30 | You can get Windows 2003 server DDK with ml64 and cl for AMD64 from 31 | http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) 32 | -------------------------------------------------------------------------------- /test/beast/core/detail/varint.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | 8 | // Test that header file is self-contained. 9 | #include 10 | 11 | #include 12 | 13 | namespace boost { 14 | namespace beast { 15 | namespace detail { 16 | 17 | class varint_test : public beast::unit_test::suite 18 | { 19 | public: 20 | void 21 | testVarint() 22 | { 23 | std::size_t n0 = 0; 24 | std::size_t n1 = 1; 25 | for(;;) 26 | { 27 | char buf[16]; 28 | BOOST_ASSERT(sizeof(buf) >= varint_size(n0)); 29 | auto it = &buf[0]; 30 | varint_write(it, n0); 31 | it = &buf[0]; 32 | auto n = varint_read(it); 33 | BEAST_EXPECT(n == n0); 34 | n = n0 + n1; 35 | if(n < n1) 36 | break; 37 | n0 = n1; 38 | n1 = n; 39 | } 40 | } 41 | 42 | void 43 | run() 44 | { 45 | testVarint(); 46 | } 47 | }; 48 | 49 | BEAST_DEFINE_TESTSUITE(beast,core,varint); 50 | 51 | } // detail 52 | } // beast 53 | } // boost 54 | -------------------------------------------------------------------------------- /test/beast/core/Jamfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | local SOURCES = 11 | async_result.cpp 12 | bind_handler.cpp 13 | buffer_cat.cpp 14 | buffer_prefix.cpp 15 | buffered_read_stream.cpp 16 | buffers_adapter.cpp 17 | clamp.cpp 18 | consuming_buffers.cpp 19 | error.cpp 20 | file.cpp 21 | file_posix.cpp 22 | file_stdio.cpp 23 | file_win32.cpp 24 | flat_buffer.cpp 25 | flat_static_buffer.cpp 26 | handler_alloc.cpp 27 | handler_ptr.cpp 28 | multi_buffer.cpp 29 | ostream.cpp 30 | read_size.cpp 31 | span.cpp 32 | static_buffer.cpp 33 | static_string.cpp 34 | string.cpp 35 | string_param.cpp 36 | type_traits.cpp 37 | base64.cpp 38 | empty_base_optimization.cpp 39 | sha1.cpp 40 | detail/variant.cpp 41 | detail/varint.cpp 42 | ; 43 | 44 | local RUN_TESTS ; 45 | 46 | for local f in $(SOURCES) 47 | { 48 | RUN_TESTS += [ run $(f) $(TEST_MAIN) ] ; 49 | } 50 | 51 | alias run-tests : $(RUN_TESTS) ; 52 | 53 | exe fat-tests : $(TEST_MAIN) $(SOURCES) ; 54 | 55 | explicit fat-tests ; 56 | -------------------------------------------------------------------------------- /test/beast/core/async_result.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace boost { 18 | namespace beast { 19 | namespace { 20 | 21 | struct handler 22 | { 23 | void operator()(beast::error_code, std::size_t) const; 24 | }; 25 | 26 | static_assert(detail::is_invocable< 27 | typename async_result::completion_handler_type, 28 | void(error_code, std::size_t)>::value, ""); 29 | 30 | static_assert(std::is_same::return_type>::value, ""); 32 | 33 | static_assert(std::is_constructible< 34 | async_result, 36 | typename async_result::completion_handler_type&>::value, ""); 39 | 40 | } // (anon-ns) 41 | } // beast 42 | } // boost 43 | -------------------------------------------------------------------------------- /test/beast/websocket/mask.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | #include 14 | 15 | namespace boost { 16 | namespace beast { 17 | namespace websocket { 18 | namespace detail { 19 | 20 | class mask_test : public beast::unit_test::suite 21 | { 22 | public: 23 | struct test_generator 24 | { 25 | using result_type = std::uint32_t; 26 | 27 | result_type n = 0; 28 | 29 | void 30 | seed(std::seed_seq const&) 31 | { 32 | } 33 | 34 | void 35 | seed(result_type const&) 36 | { 37 | } 38 | 39 | std::uint32_t 40 | operator()() 41 | { 42 | return n++; 43 | } 44 | }; 45 | 46 | void run() override 47 | { 48 | maskgen_t mg; 49 | BEAST_EXPECT(mg() != 0); 50 | } 51 | }; 52 | 53 | BEAST_DEFINE_TESTSUITE(beast,websocket,mask); 54 | 55 | } // detail 56 | } // websocket 57 | } // beast 58 | } // boost 59 | -------------------------------------------------------------------------------- /test/extras/include/boost/beast/unit_test/global_suites.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_UNIT_TEST_GLOBAL_SUITES_HPP 11 | #define BOOST_BEAST_UNIT_TEST_GLOBAL_SUITES_HPP 12 | 13 | #include 14 | 15 | namespace boost { 16 | namespace beast { 17 | namespace unit_test { 18 | 19 | namespace detail { 20 | 21 | /// Holds test suites registered during static initialization. 22 | inline 23 | suite_list& 24 | global_suites() 25 | { 26 | static suite_list s; 27 | return s; 28 | } 29 | 30 | template 31 | struct insert_suite 32 | { 33 | insert_suite(char const* name, char const* module, 34 | char const* library, bool manual) 35 | { 36 | global_suites().insert( 37 | name, module, library, manual); 38 | } 39 | }; 40 | 41 | } // detail 42 | 43 | /// Holds test suites registered during static initialization. 44 | inline 45 | suite_list const& 46 | global_suites() 47 | { 48 | return detail::global_suites(); 49 | } 50 | 51 | } // unit_test 52 | } // beast 53 | } // boost 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /test/beast/core/read_size.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include 20 | 21 | namespace boost { 22 | namespace beast { 23 | 24 | class read_size_test : public beast::unit_test::suite 25 | { 26 | public: 27 | template 28 | void 29 | check() 30 | { 31 | DynamicBuffer buffer; 32 | read_size(buffer, 65536); 33 | pass(); 34 | } 35 | 36 | void 37 | run() override 38 | { 39 | check(); 40 | check>(); 41 | check(); 42 | check>(); 43 | check(); 44 | } 45 | }; 46 | 47 | BEAST_DEFINE_TESTSUITE(beast,core,read_size); 48 | 49 | } // beast 50 | } // boost 51 | -------------------------------------------------------------------------------- /test/beast/websocket/rfc6455.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | // Test that header file is self-contained. 11 | #include 12 | 13 | #include 14 | 15 | namespace boost { 16 | namespace beast { 17 | namespace websocket { 18 | 19 | class rfc6455_test 20 | : public beast::unit_test::suite 21 | { 22 | public: 23 | void 24 | test_is_upgrade() 25 | { 26 | http::header req; 27 | req.version(10); 28 | BEAST_EXPECT(! is_upgrade(req)); 29 | req.version(11); 30 | req.method(http::verb::post); 31 | req.target("/"); 32 | BEAST_EXPECT(! is_upgrade(req)); 33 | req.method(http::verb::get); 34 | req.insert("Connection", "upgrade"); 35 | BEAST_EXPECT(! is_upgrade(req)); 36 | req.insert("Upgrade", "websocket"); 37 | BEAST_EXPECT(is_upgrade(req)); 38 | } 39 | 40 | void 41 | run() override 42 | { 43 | test_is_upgrade(); 44 | } 45 | }; 46 | 47 | BEAST_DEFINE_TESTSUITE(beast,websocket,rfc6455); 48 | 49 | } // websocket 50 | } // beast 51 | } // boost 52 | -------------------------------------------------------------------------------- /test/beast/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | # Official repository: https://github.com/boostorg/beast 8 | # 9 | 10 | GroupSources(test/extras/include/boost/beast extras) 11 | GroupSources(include/boost/beast beast) 12 | GroupSources(test/beast/core "/") 13 | 14 | add_executable (tests-beast-core 15 | ${BOOST_BEAST_INCLUDES} 16 | ${EXTRAS_INCLUDES} 17 | ${TEST_MAIN} 18 | Jamfile 19 | buffer_test.hpp 20 | file_test.hpp 21 | async_result.cpp 22 | bind_handler.cpp 23 | buffer_cat.cpp 24 | buffer_prefix.cpp 25 | buffered_read_stream.cpp 26 | buffers_adapter.cpp 27 | clamp.cpp 28 | consuming_buffers.cpp 29 | error.cpp 30 | file.cpp 31 | file_posix.cpp 32 | file_stdio.cpp 33 | file_win32.cpp 34 | flat_buffer.cpp 35 | flat_static_buffer.cpp 36 | handler_alloc.cpp 37 | handler_ptr.cpp 38 | multi_buffer.cpp 39 | ostream.cpp 40 | read_size.cpp 41 | span.cpp 42 | static_string.cpp 43 | string.cpp 44 | static_buffer.cpp 45 | string_param.cpp 46 | type_traits.cpp 47 | base64.cpp 48 | empty_base_optimization.cpp 49 | sha1.cpp 50 | detail/variant.cpp 51 | detail/varint.cpp 52 | ) 53 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/dotzlib/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /include/boost/beast/http.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_HTTP_HPP 11 | #define BOOST_BEAST_HTTP_HPP 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /include/boost/beast/config.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_CONFIG_HPP 11 | #define BOOST_BEAST_CONFIG_HPP 12 | 13 | // Available to every header 14 | #include 15 | #include 16 | #include 17 | 18 | /* 19 | _MSC_VER and _MSC_FULL_VER by version: 20 | 21 | 14.0 (2015) 1900 190023026 22 | 14.0 (2015 Update 1) 1900 190023506 23 | 14.0 (2015 Update 2) 1900 190023918 24 | 14.0 (2015 Update 3) 1900 190024210 25 | */ 26 | 27 | #if defined(BOOST_MSVC) 28 | # if BOOST_MSVC_FULL_VER < 190024210 29 | # error Beast requires C++11: Visual Studio 2015 Update 3 or later needed 30 | # endif 31 | 32 | #elif defined(BOOST_GCC) 33 | # if(BOOST_GCC < 40801) 34 | # error Beast requires C++11: gcc version 4.8 or later needed 35 | # endif 36 | 37 | #else 38 | # if \ 39 | defined(BOOST_NO_CXX11_DECLTYPE) || \ 40 | defined(BOOST_NO_CXX11_HDR_TUPLE) || \ 41 | defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \ 42 | defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) 43 | # error Beast requires C++11: a conforming compiler is needed 44 | # endif 45 | 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /tools/blacklist.supp: -------------------------------------------------------------------------------- 1 | # Remember that this blacklist file is GLOBAL to all sanitizers 2 | # Be therefore extremely careful when considering to add a sanitizer 3 | # filter here instead of using a runtime suppression 4 | # 5 | # Remember also that filters here quite literally completely 6 | # remove instrumentation altogether, so filtering here means 7 | # that sanitizers such as tsan will false positive on problems 8 | # introduced by code filtered here. 9 | # 10 | # The main use for this file is ubsan, as it's the only sanitizer 11 | # without a runtime suppression facility. 12 | # 13 | # Be ESPECIALLY careful when filtering out entire source files! 14 | # Try if at all possible to filter only functions using fun:regex 15 | # Remember you must use mangled symbol names with fun:regex 16 | 17 | # boost/lexical_cast.hpp:1625:43: runtime error: downcast of address 0x7fbb4fffbce8 which does not point to an object of type 'buffer_t' (aka 'parser_buf >, char>') 18 | # Fixed in Boost 1.63.0 https://svn.boost.org/trac/boost/ticket/12889 19 | # 20 | fun:*shl_input_streamable* 21 | 22 | ## The well known ubsan failure in libstdc++ extant for years :) 23 | # Line 96:24: runtime error: load of value 4294967221, which is not a valid value for type 'std::_Ios_Fmtflags' 24 | # 25 | #fun:*_Ios_Fmtflags* 26 | 27 | # boost/any.hpp:259:16: runtime error: downcast of address 0x000004392e70 which does not point to an object of type 'any::holder' 28 | # 29 | #fun:*any_cast* 30 | -------------------------------------------------------------------------------- /test/extras/include/boost/beast/unit_test/amount.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_UNIT_TEST_AMOUNT_HPP 11 | #define BOOST_BEAST_UNIT_TEST_AMOUNT_HPP 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace boost { 18 | namespace beast { 19 | namespace unit_test { 20 | 21 | /** Utility for producing nicely composed output of amounts with units. */ 22 | class amount 23 | { 24 | private: 25 | std::size_t n_; 26 | std::string const& what_; 27 | 28 | public: 29 | amount(amount const&) = default; 30 | amount& operator=(amount const&) = delete; 31 | 32 | template 33 | amount(std::size_t n, std::string const& what); 34 | 35 | friend 36 | std::ostream& 37 | operator<<(std::ostream& s, amount const& t); 38 | }; 39 | 40 | template 41 | amount::amount(std::size_t n, std::string const& what) 42 | : n_(n) 43 | , what_(what) 44 | { 45 | } 46 | 47 | inline 48 | std::ostream& 49 | operator<<(std::ostream& s, amount const& t) 50 | { 51 | s << t.n_ << " " << t.what_ <<((t.n_ != 1) ? "s" : ""); 52 | return s; 53 | } 54 | 55 | } // unit_test 56 | } // beast 57 | } // boost 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /include/boost/beast/core/detail/clamp.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_CORE_DETAIL_CLAMP_HPP 11 | #define BOOST_BEAST_CORE_DETAIL_CLAMP_HPP 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace boost { 18 | namespace beast { 19 | namespace detail { 20 | 21 | template 22 | static 23 | std::size_t 24 | clamp(UInt x) 25 | { 26 | if(x >= (std::numeric_limits::max)()) 27 | return (std::numeric_limits::max)(); 28 | return static_cast(x); 29 | } 30 | 31 | template 32 | static 33 | std::size_t 34 | clamp(UInt x, std::size_t limit) 35 | { 36 | if(x >= limit) 37 | return limit; 38 | return static_cast(x); 39 | } 40 | 41 | // return `true` if x + y > z, which are unsigned 42 | template< 43 | class U1, class U2, class U3> 44 | constexpr 45 | bool 46 | sum_exceeds(U1 x, U2 y, U3 z) 47 | { 48 | static_assert( 49 | std::is_unsigned::value && 50 | std::is_unsigned::value && 51 | std::is_unsigned::value, ""); 52 | return y > z || x > z - y; 53 | } 54 | 55 | } // detail 56 | } // beast 57 | } // boost 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/puff/puff.h: -------------------------------------------------------------------------------- 1 | /* puff.h 2 | Copyright (C) 2002-2013 Mark Adler, all rights reserved 3 | version 2.3, 21 Jan 2013 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the author be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | Mark Adler madler@alumni.caltech.edu 22 | */ 23 | 24 | 25 | /* 26 | * See puff.c for purpose and usage. 27 | */ 28 | #ifndef NIL 29 | # define NIL ((unsigned char *)0) /* for no output option */ 30 | #endif 31 | 32 | int puff(unsigned char *dest, /* pointer to destination pointer */ 33 | unsigned long *destlen, /* amount of output space */ 34 | const unsigned char *source, /* pointer to source data pointer */ 35 | unsigned long *sourcelen); /* amount of input available */ 36 | -------------------------------------------------------------------------------- /doc/qbk/03_core/4_files.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | Official repository: https://github.com/boostorg/beast 8 | ] 9 | 10 | [section Files] 11 | 12 | Often when implementing network algorithms such as servers, it is necessary 13 | to interact with files on the system. Beast defines the __File__ concept 14 | and several models to facilitate cross-platform interaction with the 15 | underlying filesystem: 16 | 17 | [table File Types 18 | [[Name][Description]] 19 | [[ 20 | [link beast.ref.boost__beast__file `file`] 21 | ][ 22 | `file` is a type alias to one of the following implementations, 23 | depending on what is available on the target platform. 24 | ]] 25 | [[ 26 | [link beast.ref.boost__beast__file_stdio `file_stdio`] 27 | ][ 28 | This implementation of __File__ uses the C++ standard library 29 | facilities obtained by including ``. 30 | ]] 31 | [[ 32 | [link beast.ref.boost__beast__file_win32 `file_win32`] 33 | ][ 34 | This implements a __File__ for the Win32 API. It provides low level 35 | access to the native file handle when necessary. 36 | ]] 37 | [[ 38 | [link beast.ref.boost__beast__file_posix `file_posix`] 39 | ][ 40 | For POSIX systems, this class provides a suitable implementation 41 | of __File__ which wraps the native file descriptor and provides 42 | it if necessary. 43 | ]] 44 | ] 45 | 46 | [endsect] 47 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/watcom/watcom_l.mak: -------------------------------------------------------------------------------- 1 | # Makefile for zlib 2 | # OpenWatcom large model 3 | # Last updated: 28-Dec-2005 4 | 5 | # To use, do "wmake -f watcom_l.mak" 6 | 7 | C_SOURCE = adler32.c compress.c crc32.c deflate.c & 8 | gzclose.c gzlib.c gzread.c gzwrite.c & 9 | infback.c inffast.c inflate.c inftrees.c & 10 | trees.c uncompr.c zutil.c 11 | 12 | OBJS = adler32.obj compress.obj crc32.obj deflate.obj & 13 | gzclose.obj gzlib.obj gzread.obj gzwrite.obj & 14 | infback.obj inffast.obj inflate.obj inftrees.obj & 15 | trees.obj uncompr.obj zutil.obj 16 | 17 | CC = wcc 18 | LINKER = wcl 19 | CFLAGS = -zq -ml -s -bt=dos -oilrtfm -fr=nul -wx 20 | ZLIB_LIB = zlib_l.lib 21 | 22 | .C.OBJ: 23 | $(CC) $(CFLAGS) $[@ 24 | 25 | all: $(ZLIB_LIB) example.exe minigzip.exe 26 | 27 | $(ZLIB_LIB): $(OBJS) 28 | wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj 29 | wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj 30 | wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj 31 | wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj 32 | wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj 33 | 34 | example.exe: $(ZLIB_LIB) example.obj 35 | $(LINKER) -fe=example.exe example.obj $(ZLIB_LIB) 36 | 37 | minigzip.exe: $(ZLIB_LIB) minigzip.obj 38 | $(LINKER) -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) 39 | 40 | clean: .SYMBOLIC 41 | del *.obj 42 | del $(ZLIB_LIB) 43 | @echo Cleaning done 44 | -------------------------------------------------------------------------------- /include/boost/beast/http/impl/parser.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_HTTP_IMPL_PARSER_IPP 11 | #define BOOST_BEAST_HTTP_IMPL_PARSER_IPP 12 | 13 | #include 14 | #include 15 | 16 | namespace boost { 17 | namespace beast { 18 | namespace http { 19 | 20 | template 21 | parser:: 22 | parser() 23 | : wr_(m_) 24 | { 25 | } 26 | 27 | template 28 | template 29 | parser:: 30 | parser(Arg1&& arg1, ArgN&&... argn) 31 | : m_(std::forward(arg1), 32 | std::forward(argn)...) 33 | , wr_(m_) 34 | { 35 | } 36 | 37 | template 38 | template 39 | parser:: 40 | parser(parser&& other, 41 | Args&&... args) 42 | : base_type(std::move(other)) 43 | , m_(other.release(), std::forward(args)...) 44 | , wr_(m_) 45 | { 46 | if(other.wr_inited_) 47 | BOOST_THROW_EXCEPTION(std::invalid_argument{ 48 | "moved-from parser has a body"}); 49 | } 50 | 51 | } // http 52 | } // beast 53 | } // boost 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /include/boost/beast/websocket/impl/ssl.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_WEBSOCKET_IMPL_SSL_IPP_INCLUDED 11 | #define BOOST_BEAST_WEBSOCKET_IMPL_SSL_IPP_INCLUDED 12 | 13 | #include 14 | 15 | namespace boost { 16 | namespace beast { 17 | namespace websocket { 18 | 19 | /* 20 | 21 | See 22 | http://stackoverflow.com/questions/32046034/what-is-the-proper-way-to-securely-disconnect-an-asio-ssl-socket/32054476#32054476 23 | 24 | Behavior of ssl::stream regarding close_ 25 | 26 | If the remote host calls async_shutdown then the 27 | local host's async_read will complete with eof. 28 | 29 | If both hosts call async_shutdown then the calls 30 | to async_shutdown will complete with eof. 31 | 32 | */ 33 | 34 | template 35 | void 36 | teardown( 37 | role_type, 38 | boost::asio::ssl::stream& stream, 39 | error_code& ec) 40 | { 41 | stream.shutdown(ec); 42 | } 43 | 44 | template< 45 | class AsyncStream, 46 | class TeardownHandler> 47 | void 48 | async_teardown( 49 | role_type, 50 | boost::asio::ssl::stream& stream, 51 | TeardownHandler&& handler) 52 | { 53 | stream.async_shutdown( 54 | std::forward(handler)); 55 | } 56 | 57 | } // websocket 58 | } // beast 59 | } // boost 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /tools/install-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Exit if anything fails. 3 | set -eux 4 | 5 | HERE=$PWD 6 | 7 | # Override gcc version to $GCC_VER. 8 | # Put an appropriate symlink at the front of the path. 9 | mkdir -pv $HOME/bin 10 | for g in gcc g++ gcov gcc-ar gcc-nm gcc-ranlib 11 | do 12 | test -x $( type -p ${g}-$GCC_VER ) 13 | ln -sv $(type -p ${g}-$GCC_VER) $HOME/bin/${g} 14 | done 15 | 16 | if [[ -n ${CLANG_VER:-} ]]; then 17 | # There are cases where the directory exists, but the exe is not available. 18 | # Use this workaround for now. 19 | if [[ ! -x llvm-${LLVM_VERSION}/bin/llvm-config ]] && [[ -d llvm-${LLVM_VERSION} ]]; then 20 | rm -fr llvm-${LLVM_VERSION} 21 | fi 22 | if [[ ! -d llvm-${LLVM_VERSION} ]]; then 23 | mkdir llvm-${LLVM_VERSION} 24 | LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz" 25 | wget -O - ${LLVM_URL} | tar -Jxvf - --strip 1 -C llvm-${LLVM_VERSION} 26 | fi 27 | llvm-${LLVM_VERSION}/bin/llvm-config --version; 28 | export LLVM_CONFIG="llvm-${LLVM_VERSION}/bin/llvm-config"; 29 | fi 30 | 31 | # NOTE, changed from PWD -> HOME 32 | export PATH=$HOME/bin:$PATH 33 | 34 | # What versions are we ACTUALLY running? 35 | if [ -x $HOME/bin/g++ ]; then 36 | $HOME/bin/g++ -v 37 | fi 38 | if [ -x $HOME/bin/clang ]; then 39 | $HOME/bin/clang -v 40 | fi 41 | 42 | # Avoid `spurious errors` caused by ~/.npm permission issues 43 | # Does it already exist? Who owns? What permissions? 44 | ls -lah ~/.npm || mkdir ~/.npm 45 | 46 | # Make sure we own it 47 | chown -Rc $USER ~/.npm 48 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/watcom/watcom_f.mak: -------------------------------------------------------------------------------- 1 | # Makefile for zlib 2 | # OpenWatcom flat model 3 | # Last updated: 28-Dec-2005 4 | 5 | # To use, do "wmake -f watcom_f.mak" 6 | 7 | C_SOURCE = adler32.c compress.c crc32.c deflate.c & 8 | gzclose.c gzlib.c gzread.c gzwrite.c & 9 | infback.c inffast.c inflate.c inftrees.c & 10 | trees.c uncompr.c zutil.c 11 | 12 | OBJS = adler32.obj compress.obj crc32.obj deflate.obj & 13 | gzclose.obj gzlib.obj gzread.obj gzwrite.obj & 14 | infback.obj inffast.obj inflate.obj inftrees.obj & 15 | trees.obj uncompr.obj zutil.obj 16 | 17 | CC = wcc386 18 | LINKER = wcl386 19 | CFLAGS = -zq -mf -3r -fp3 -s -bt=dos -oilrtfm -fr=nul -wx 20 | ZLIB_LIB = zlib_f.lib 21 | 22 | .C.OBJ: 23 | $(CC) $(CFLAGS) $[@ 24 | 25 | all: $(ZLIB_LIB) example.exe minigzip.exe 26 | 27 | $(ZLIB_LIB): $(OBJS) 28 | wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj 29 | wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj 30 | wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj 31 | wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj 32 | wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj 33 | 34 | example.exe: $(ZLIB_LIB) example.obj 35 | $(LINKER) -ldos32a -fe=example.exe example.obj $(ZLIB_LIB) 36 | 37 | minigzip.exe: $(ZLIB_LIB) minigzip.obj 38 | $(LINKER) -ldos32a -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) 39 | 40 | clean: .SYMBOLIC 41 | del *.obj 42 | del $(ZLIB_LIB) 43 | @echo Cleaning done 44 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/iostream3/README: -------------------------------------------------------------------------------- 1 | These classes provide a C++ stream interface to the zlib library. It allows you 2 | to do things like: 3 | 4 | gzofstream outf("blah.gz"); 5 | outf << "These go into the gzip file " << 123 << endl; 6 | 7 | It does this by deriving a specialized stream buffer for gzipped files, which is 8 | the way Stroustrup would have done it. :-> 9 | 10 | The gzifstream and gzofstream classes were originally written by Kevin Ruland 11 | and made available in the zlib contrib/iostream directory. The older version still 12 | compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of 13 | this version. 14 | 15 | The new classes are as standard-compliant as possible, closely following the 16 | approach of the standard library's fstream classes. It compiles under gcc versions 17 | 3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard 18 | library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs 19 | from the previous one in the following respects: 20 | - added showmanyc 21 | - added setbuf, with support for unbuffered output via setbuf(0,0) 22 | - a few bug fixes of stream behavior 23 | - gzipped output file opened with default compression level instead of maximum level 24 | - setcompressionlevel()/strategy() members replaced by single setcompression() 25 | 26 | The code is provided "as is", with the permission to use, copy, modify, distribute 27 | and sell it for any purpose without fee. 28 | 29 | Ludwig Schwardt 30 | 31 | 32 | DSP Lab 33 | Electrical & Electronic Engineering Department 34 | University of Stellenbosch 35 | South Africa 36 | -------------------------------------------------------------------------------- /include/boost/beast/core.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // Official repository: https://github.com/boostorg/beast 8 | // 9 | 10 | #ifndef BOOST_BEAST_CORE_HPP 11 | #define BOOST_BEAST_CORE_HPP 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /test/extern/zlib-1.2.11/contrib/minizip/minizip.1: -------------------------------------------------------------------------------- 1 | .\" Hey, EMACS: -*- nroff -*- 2 | .TH minizip 1 "May 2, 2001" 3 | .\" Please adjust this date whenever revising the manpage. 4 | .\" 5 | .\" Some roff macros, for reference: 6 | .\" .nh disable hyphenation 7 | .\" .hy enable hyphenation 8 | .\" .ad l left justify 9 | .\" .ad b justify to both left and right margins 10 | .\" .nf disable filling 11 | .\" .fi enable filling 12 | .\" .br insert line break 13 | .\" .sp insert n+1 empty lines 14 | .\" for manpage-specific macros, see man(7) 15 | .SH NAME 16 | minizip - create ZIP archives 17 | .SH SYNOPSIS 18 | .B minizip 19 | .RI [ -o ] 20 | zipfile [ " files" ... ] 21 | .SH DESCRIPTION 22 | .B minizip 23 | is a simple tool which allows the creation of compressed file archives 24 | in the ZIP format used by the MS-DOS utility PKZIP. It was written as 25 | a demonstration of the 26 | .IR zlib (3) 27 | library and therefore lack many of the features of the 28 | .IR zip (1) 29 | program. 30 | .SH OPTIONS 31 | The first argument supplied is the name of the ZIP archive to create or 32 | .RI -o 33 | in which case it is ignored and the second argument treated as the 34 | name of the ZIP file. If the ZIP file already exists it will be 35 | overwritten. 36 | .PP 37 | Subsequent arguments specify a list of files to place in the ZIP 38 | archive. If none are specified then an empty archive will be created. 39 | .SH SEE ALSO 40 | .BR miniunzip (1), 41 | .BR zlib (3), 42 | .BR zip (1). 43 | .SH AUTHOR 44 | This program was written by Gilles Vollant. This manual page was 45 | written by Mark Brown . 46 | 47 | -------------------------------------------------------------------------------- /doc/qbk/06_websocket.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) 3 | 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | Official repository: https://github.com/boostorg/beast 8 | ] 9 | 10 | [section Using WebSocket] 11 | 12 | The WebSocket Protocol enables two-way communication between a client 13 | running untrusted code in a controlled environment to a remote host that has 14 | opted-in to communications from that code. The protocol consists of an opening 15 | handshake followed by basic message framing, layered over TCP. The goal of 16 | this technology is to provide a mechanism for browser-based applications 17 | needing two-way communication with servers without relying on opening multiple 18 | HTTP connections. 19 | 20 | Beast provides developers with a robust WebSocket implementation built on 21 | Boost.Asio with a consistent asynchronous model using a modern C++ approach. 22 | 23 | [note 24 | This documentation assumes familiarity with __Asio__ and 25 | the protocol specification described in __rfc6455__. 26 | Sample code and identifiers appearing in this section is written 27 | as if these declarations are in effect: 28 | 29 | [ws_snippet_1] 30 | ] 31 | 32 | [include 06_websocket/1_streams.qbk] 33 | [include 06_websocket/2_connect.qbk] 34 | [include 06_websocket/3_client.qbk] 35 | [include 06_websocket/4_server.qbk] 36 | [include 06_websocket/5_messages.qbk] 37 | [include 06_websocket/6_control.qbk] 38 | [include 06_websocket/7_teardown.qbk] 39 | [include 06_websocket/8_notes.qbk] 40 | 41 | [endsect] 42 | --------------------------------------------------------------------------------