- Notifications
You must be signed in to change notification settings - Fork182
An asynchronous web framework for C++ built on top of Qt
License
LGPL-2.1, GPL-2.0 licenses found
Licenses found
vinipsmaker/tufao
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
!!! I can no longer maintain this project. If you're interessed, please contact me and I can move the projetct to you !!!
Tufão is a web framework for C++ that makes use of Qt's object communicationsystem (signals & slots). It features:
- High performance standalone server
- Cross-plataform support
- Gooddocumentation
- Support modern HTTP features
- Persistent streams
- Chunked entities
- 100-continue status
- WebSocket
- HTTPS support
- Flexible request router
- Static file server with support for conditional requests, partial downloadand automatic mime detection
- Plugin-based server to allow change the running code without restart theapplication
- Flexible and secure session support
- QtCreator's pluginto allow create new applications rapidly
- Lots of tests
- Timeout support
- C++11
You can generate documentation from the source code using Doxygen. Thedocumentation will be put on the doc folder in the html and tex formats. Thereis also experimental support for Qt compressed help files.
The library is under the LGPLv2 and public header files, documentation andexamples are under MIT license.
The Tufão logo is licensed under [Creative Commons Attribution 3.0 Unported](http://creativecommons.org/licenses/by/3.0/).
The library is dynamic linked against Qt and include code from Boost.Httpparser. Qt library is licensed under LGPL and Boost.Http is licensed under theBoost Software License.
So, you can create commercial applications (theonly restriction is thatifyou do any modifications toTufão, these modifications must be redistributed).
$ git submodule update --initMake sure you have Qt and CMake installed and with the PATH to its executablesset, then create a folder for the build and, from there, run:
$ cmake OPTIONS path_to_source_dir$ make MAKEOPTIONSOPTIONS can be null or have a combination of the following values:
-DCMAKE_INSTALL_PREFIX=${INSTALLDIR}sets the directory where to installTufão.-DCMAKE_BUILD_TYPE=Debug-DCMAKE_BUILD_TYPE=Release-DCMAKE_BUILD_TYPE=RelWithDebInfo-DCMAKE_BUILD_TYPE=MinSizeRel-DLIB_SUFFIX=${LIB_SUFFIX}set the suffix for the install destination. Ifyou are compiling Tufão under a 64 bit system using a 32 bit "environment",maybe you want to set this variable to 32, then Tufão libs will be installedunder"${INSTALLDIR}/lib32". This setting is highly dependent on youroperating system conventions and I do not try to put any auto magicdetection.-DGENERATE_DOC=YESgenerate documentation using Doxygen-DENABLE_TESTS=YESgenerate and run tests
OPTIONS available on Windows:
-G"MinGW Makefiles"to generate Makefiles for use with MinGW environment-G"Visual Studio 10"to generate project files for Visual Studio 10
MAKEOPTIONS can be null or have a combination of the following values:
installinstalls TufãoDESTDIR=${PKGDIR}sets the directory where to install Tufão. This optionsshould be used if you intend to package Tufão to set the package directory.To choose another installation directory, see options in OPTIONS, above.
Example:
$ cmake -DCMAKE_INSTALL_PREFIX=/usr$ make DESTDIR=pkg installNOTE:Qt 5.0 or later is required for 1.x series. Qt 4.7 or later is required to 0.xseries.
NOTE:If you intend to create a CPack-based installer, just run:
# To create a binary distribution:cpack -C CPackConfig.cmake# To create a source distribution:cpack -C CPackSourceConfig.cmake# To create a Windows NSIS-based installer:cpack -GNSISTo generate the documentation, just run doxygen using Doxyfile as configurationfile and the documentation will be generated in the folder doc. Thedocumentation is available in the following formats:
- HTML: Always generated. It should be in the doc/html folder.
- latex: You can use this format to generate a pdf. Just run make inside thedoc/latex folder.
- Qt Compressed Help file: If you have qhelpgenerator binary tool in thesystem PATH, then the file is generated when you run doxygen and should bein doc/qch/tufao.qch. If you have qhelpgenerator tool installed, but notconfigured in the system PATH, but still want to generate the documentationin this format, just run the tool using doc/html/index.qhp as input file.
Tufão also have a lot of code to test its correctness. These codes are based onQTestLib and generate self-contained executables. There is also some CTest rulesand integration with the CMake build. To run the tests, just execute:
make testsOr, if you don't want to use Makefiles:
ctestIn Visual Studio, the targetRUN_TESTS is created.
CTest integrates withCDashto allow developers to centralize the tests result. You can send the results toCDash running theExperimental target:
make ExperimentalYou can see the Tufão testing log atTufao CDash project's page.
The default install prefix is /usr/local, if you don't intend to change it, justrun, after build:
# make installTo install to a different prefix, run:
$ cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}$ make installNOTE: You may need to runldconfig after installation depending on yoursystem.
To use Tufão in your Qt projects, just edit your .pro file and add the line:
CONFIG += C++11 TUFAO1You can find some examples in the examples folder.
If you're planning to use OS X, then the following line isalsorequired,as reported by some users:
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7Tufão has PKG-CONFIG support also. Its module name is 'tufao1'.
If you want use Tufão in other build system, just add the compiler option-ltufao1.
You can also see Tufão documentation integrated in QtAssistant.
Version 1.4
- Replaces Ryan Dahl's HTTP parser. Now Boost.Http parser is used.
- Fixes HTTP pipelining support.
Version 1.3
- Added
canHandleRequestto HttpFileServer
Version 1.2
- New class to handle REST api introduced (thanks to Timothy Reaves)
- The class has its own plugin system, partly incompatible with Tufão'sdefault
- Tufão's plugin system improved to better track files deletion.
- It requires no code changes, but you still need to do a one-line changeto the config file, because I was worried about backwards compatibility.
- See HttpPluginServer::setConfig for details
Version 1.1
- Add ability to ignore a set of SSL errors in WebSocket
- Documentation updates
- Bugfix in AbstractHttpServerRequestHandler (thanks to Benjamin Zeller)
- Updated Ryan Dahl's HTTP parser to version 2.2.1
Version 1.0
- The project finally have a logo (made by me in Inkscape)
- Deprecated API was removed
- Url and QueryString removed in favor of QUrl
- Headers refactored to inherit from QMultiHash instead of QMultiMap
- HttpServerResponse
- Constructor's options argument is optional now
- setOptions method added
- Constructor takes a reference to a QIODevice instead a pointer
- HttpServerRequest
- Constructor takes a reference to a QAbstractSocket instead a pointer
- socket method returns a reference instead a pointer
- url returns a QUrl
- data signal was changed and you must use readBody method to access body's content.
- the upgrade'shead data is accessed from the request body from now on
- now the object auto-disconnects slots from data and end signals right before emit ready
- setCustomData and customData methods added
- Now HttpServerRequestRouter use these methods to pass the list of capturedtexts
- HttpServer uses reference instead of pointers in several places
- AbstractHttpServerRequestRouter refactored to explore lambdas features.
- Tufão's plugin system fully refactored
- It's using JSON files as configuration
- AbstractHttpServerRequestHandler::handleRequest
- It uses references instead pointers
- It receives 2 arguments instead of 3
- One more abstraction to sessions created to explore lambdas
- WebSocket
- startServerHandshake is taking references instead pointers
- LESS POINTERS and MORE REFERENCES
- This change exposes a model more predictive and natural
- I'm caring less about Qt style and more about C++ style
- But don't worry, I'll maintain a balance
- Using scoped enums
- HttpFileServer uses/sends mime info
- Interfaces don't inherit from QObject anymore, so you can use multipleinheritance to make the same class implement many interfaces
- HttpUpgradeRouter introduced
- HttpServer::setUpgradeHandler also
- Updated QtCreator plugin to work with QtCreator 2.7.0 and Qt 5
Version 0.6:
- HttpServerRequest
- setUrl added
- UrlRewriterHandler added
- HttpUpgradeRouter added
- headers can be "streamed" to QDebug objects
Version 0.5:
- WebSocket
- peerAddress() method added
- peerSocket() method added
Version 0.4:
- Using CMake build system
- Changes to allow parallel Tufão installations (if major versions differs)
- Added PKGCONFIG support
- Session support
- Better documentation
Version 0.3
- More application templates in QtCreator Tufão's plugin
- Class to serve static files with support for conditional requests andbyte-range requests
- Robust request router added
- HTTP plugin server added
- Using newer version of Ryan Dahl's HTTP parser
- Changed license from public headers to MIT
- MSVC support
- Some minor improvements
Version 0.2:
- Code is more stable
- Documentation improved
- HttpServerResponse is easier to use
- WebSocket support
- TUFAO_VERSION_MAJOR and TUFAO_VERSION_MINOR macros added
- QtCreator plugin
- New examples
Here is a small roadmap for Tufão:
1.4:
- RPC support
- Service discovery and description support
1.5:
- Forms and file uploads
About
An asynchronous web framework for C++ built on top of Qt
Topics
Resources
License
LGPL-2.1, GPL-2.0 licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.