use ServerBootstrap
authorDave Watson <davejwatson@fb.com>
Thu, 19 Feb 2015 18:06:27 +0000 (10:06 -0800)
committerAlecs King <int@fb.com>
Tue, 3 Mar 2015 03:23:34 +0000 (19:23 -0800)
commit59e4f0d059f214f8aa185517551fdb99511fece0
tree9351cad7eaad09163aabff2eed7fc30ea9d2d048
parent42f4cd7c92f086c89440f6adf47c5bef34e080bb
use ServerBootstrap

Summary:
Use server bootstrap.

* code reuse
* Allows multiple accept threads easily.

Accept now doesn't happen in the server's eventBase, but a new thread.

I think I hit all the corner cases involving existingSocket, duplex, stopListening(), etc.

There are a lot of minor changes here to support all the cases, let me know if I should split anything to separate diffs

Test Plan: fbconfig -r thrift/lib/cpp2; fbmake runtests

Reviewed By: hans@fb.com

Subscribers: haijunz, yfeldblum, ruibalp, fbcode-common-diffs@, davejwatson, jsedgwick, trunkagent, doug, alandau, bmatheny, mshneer, folly-diffs@, mcduff, andrewcox, fugalh

FB internal diff: D1732895

Tasks: 5788102

Signature: t1:1732895:1423087631:379bbb131c35ce2221801bc7cec226f87ba0b1d9
folly/Makefile.am
folly/wangle/acceptor/Acceptor.h
folly/wangle/bootstrap/BootstrapTest.cpp
folly/wangle/bootstrap/ServerBootstrap-inl.h
folly/wangle/bootstrap/ServerBootstrap.cpp
folly/wangle/bootstrap/ServerBootstrap.h