Discussion:
[boost] [beast] thread per connection example?
Peter Dimov via Boost
2017-07-02 14:49:10 UTC
Permalink
Suppose that I want to implement an HTTP server that uses the thread per
connection model. What example should I use as a starting point?


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Vinnie Falco via Boost
2017-07-02 15:01:03 UTC
Permalink
On Sun, Jul 2, 2017 at 7:49 AM, Peter Dimov via Boost
Post by Peter Dimov via Boost
Suppose that I want to implement an HTTP server that uses the thread per
connection model. What example should I use as a starting point?
This framework Port creates a new thread for each connection:
https://github.com/vinniefalco/Beast/blob/78a065ba39836d91d7e70d93de7f9140f518083b/example/server-framework/http_sync_port.hpp

Thanks

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Peter Dimov via Boost
2017-07-02 15:18:56 UTC
Permalink
Post by Vinnie Falco via Boost
On Sun, Jul 2, 2017 at 7:49 AM, Peter Dimov via Boost
Post by Peter Dimov via Boost
Suppose that I want to implement an HTTP server that uses the thread per
connection model. What example should I use as a starting point?
https://github.com/vinniefalco/Beast/blob/78a065ba39836d91d7e70d93de7f9140f518083b/example/server-framework/http_sync_port.hpp
Thanks, this would have to do. It's a bit on the complex side, and the ASIO
echo example is too simple, but such is life.

This doesn't look correct by the way:

https://github.com/vinniefalco/Beast/blob/78a065ba39836d91d7e70d93de7f9140f518083b/example/server-framework/http_sync_port.hpp#L297


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Loading...