Skip to content

Commit

Permalink
Merge pull request #10 from JadeMatrix/v0.7.1
Browse files Browse the repository at this point in the history
v0.7.1
  • Loading branch information
JadeMatrix authored Nov 28, 2017
2 parents 96f54d6 + b3591ee commit 6397fda
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 61 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
[![stable version](https://img.shields.io/github/release/JadeMatrix/SHOW.svg?label=stable)](https://github.com/JadeMatrix/SHOW/releases/latest)
[![latest version](https://img.shields.io/github/release/JadeMatrix/SHOW/all.svg?label=latest)](https://github.com/JadeMatrix/SHOW/releases)

The goal of SHOW is to make an idiomatic library for standalone webserver applications written for modern C++. Currently requires C++11 or higher and a POSIX operating system.
The goal of SHOW is to make an idiomatic library for standalone webserver applications written for modern C++. SHOW is simple in the same way the standard library is simple — it doesn't make any design decisions for the programmer, instead giving them whatever tools they need to build their application.

Both HTTP/1.0 and HTTP/1.1 are supported. SHOW assumes a modern approach to application hosting, and is intended to be run behind a full reverse proxy such as [nginx](https://nginx.org/). As such, SHOW will not support HTTP/2 or TLS (HTTPS). Instead, you should write your applications to serve local HTTP/1.x requests.

SHOW uses the [`zlib` license](LICENSE).
SHOW uses the [`zlib` license](LICENSE). C++11 support and a POSIX operating system are required.

## How to use

Expand Down
19 changes: 3 additions & 16 deletions examples/multiple_clients.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ void handle_connection( show::connection* connection )
}


std::list< std::thread > workers;


int main( int argc, char* argv[] )
{
try
Expand All @@ -90,10 +87,11 @@ int main( int argc, char* argv[] )
{
try
{
workers.push_back( std::thread(
std::thread worker(
handle_connection,
new show::connection( test_server.serve() )
) );
);
worker.detach();
}
catch( show::connection_timeout& ct )
{
Expand All @@ -102,17 +100,6 @@ int main( int argc, char* argv[] )
<< std::endl
;
}

// Clean up any finished workers
auto iter = workers.begin();
while( iter != workers.end() )
if( iter -> joinable() )
{
iter -> join();
workers.erase( iter++ );
}
else
++iter;
}

return 0;
Expand Down
Loading

0 comments on commit 6397fda

Please sign in to comment.