Move SSL socket to folly

Summary: One of the last thrift -> folly moves.  Very similar to D1587625.  The only change was the exception types - there are small wrapper classes in thrift/lib/cpp/async left to convert from AsyncSocketException to TTransportException.

Test Plan:
fbconfig -r thrift; fbmake runtests

Might break other projects, will fix

Unittests postponed overnight, overridding.  Previously passed

Reviewed By: dcsommer@fb.com

Subscribers: jdperlow, trunkagent, doug, bmatheny, ssl-diffs@, njormrod, mshneer, folly-diffs@, fugalh, jsedgwick, andrewcox, alandau

FB internal diff: D1632425

Signature: t1:1632425:1414526483:339ae107bacb073bdd8cf0942fd0f6b70990feb4
Add a couple header files to install

Summary: These were reported on the google group

Test Plan: watch oss build

Reviewed By: davejwatson@fb.com

Subscribers: doug, bmatheny

FB internal diff: D1667149

Signature: t1:1667149:1415387892:bf0f8f7f55f61b2266be3d439bfc89de6147f990
Use AsyncServerSocket not TAsyncServerSocket

Summary: The latter is the old thrift typedef. This cuts dependencies.

Test Plan: compiled, contbuild

Reviewed By: davejwatson@fb.com

Subscribers: trunkagent, hphp-diffs@, doug, ps, bmatheny

FB internal diff: D1647318

Tasks: 5485692

Signature: t1:1647318:1415388512:3c74381857a699d795212a603da91360a0a49401
Remove WorkerThread shim

Summary: This has moved.

Test Plan: fbgs, watch cmake build

Reviewed By: viswanath@fb.com

Subscribers: hphp-diffs@, doug, ps, bmatheny

FB internal diff: D1667183

Signature: t1:1667183:1415397345:438b6a5c4208ca4b928dc83790125aaa010a65a5
Fix SSL tests

Summary: The old default was accidentally brought back with a recent codemod.

Test Plan: unit tests

Reviewed By: davejwatson@fb.com

Subscribers: doug, bmatheny, ssl-diffs@

FB internal diff: D1668155

Blame Revision: D1631924
Use SSLContext via folly

Summary: Cuts depencies

Test Plan: contbuild

Reviewed By: woo@fb.com

Subscribers: hphp-diffs@, doug, ps, jdperlow, bmatheny, ssl-diffs@

FB internal diff: D1667442
Use TimeoutManager from folly

Summary: It's in folly now

Test Plan: contbuild

Reviewed By: woo@fb.com

Subscribers: doug, bmatheny

FB internal diff: D1667760

Signature: t1:1667760:1415404101:db606eb51bd1d3c47beeebe214643bf3b78aa02d
Use folly::AsyncTimeout instead of TAsyncTimeout

Summary: It moved

Test Plan: contbuild, tests

Reviewed By: davejwatson@fb.com

Subscribers: doug, bmatheny

FB internal diff: D1667791

Signature: t1:1667791:1415399901:916d33e666637b37ce3e5a8534659bd647780110
Make install quiet

Summary: Just say yes! This also matches thrift's `deps.sh`

Test Plan: live

Reviewed By: davejwatson@fb.com

Subscribers: doug, bmatheny

FB internal diff: D1669989

Signature: t1:1669989:1415644140:f2619564efced51fa965c2133a3f5b0d1d5c4d32
use folly::DelayedDestruction via folly

Summary: Cutting more thrift deps

Test Plan: unit tests

Reviewed By: davejwatson@fb.com

Subscribers: doug, jdperlow, bmatheny

FB internal diff: D1669968

Signature: t1:1669968:1415643799:c4beb8ddf4b09850fdc994312e327abb8ed89c6b
Include folly/Portability.h to support gflags >= 2.1

Summary:
google-gflags changed it's namespace from ::google to ::gflags.  Both cases can be supported by including folly/Portability.h.

Built with gflags-2.0 and gflags-2.1.1 (both on CentOS 7).
Closes https://github.com/facebook/proxygen/pull/16
Github Author: y-uti <y-uti@users.noreply.github.com>

{sync, type="child", parent="github", parentrepo="facebook/proxygen", parentprnum="16", parentprfbid="732377286857200"}

Test Plan: Imported from GitHub, without a `Test Plan:` line.

Reviewed By: viswanath@fb.com

Subscribers: doug, bmatheny

FB internal diff: D1669879

Signature: t1:1669879:1415650028:9d97027701a8732637afc2319ccf61ba8ee0a1ef
Bump version to 2:0
Remove dependency on concurrency/Util.h

Summary:
Another thrift dependency we don't need. I think a lot of
these unit tests that I had to modify shouldn't be dealing with timing/raw
bytes (instead using a mock codec), but that's way out of scope right now.

Test Plan: unit tests

Reviewed By: viswanath@fb.com

Subscribers: doug, bmatheny

FB internal diff: D1667979

Signature: t1:1667979:1415734260:644724bf520de781ac5e8a0fab3f649e02baa1ed
Codemod: use angle brackets

Summary:
Now that proxygen is an installed library, it should use angle
brackets to include itself, like thrift and folly.

Test Plan: unit tests

Reviewed By: viswanath@fb.com

Subscribers: doug, jdperlow, snaptu-diffs@, bmatheny, nimishshah, louisk, cgheorghe

FB internal diff: D1672948

Signature: t1:1672948:1415735707:c8fee22fca0c4cbf3cb86f52f9ac5780ae8c0a46
Update proxygen-style.py

Summary:
Per
https://our.intern.facebook.com/intern/wiki/CppCodingConventions, angle
bracket includes should go above quote includes.

Test Plan: unit tests

Reviewed By: viswanath@fb.com

Subscribers: doug, jdperlow, snaptu-diffs@, fugalh, bmatheny, nimishshah, alikhtarov, cgheorghe

FB internal diff: D1673401

Signature: t1:1673401:1415735373:b40475a4bed22fe293d094681aeccca88ad77d76
Don't throw error and use Result<> in 1 function interface

Summary: Use just one way to report errors. Just use Result.

Test Plan:
unit tests. Verified by hand that peek() doesn't
throw. out_of_range was just getting thrown from the small section of code
I wrapped in try/catch

Reviewed By: cgheorghe@fb.com

Subscribers: trunkagent, doug, bmatheny, cgheorghe

FB internal diff: D1653770

Signature: t1:1653770:1415321164:7a522255fe33ff54a5c31b32cf3636a5ba7bec79
Adding support for Ubuntu 12.04

Summary:
Adds support for building on Ubuntu 12.04 (for all folks who haven't upgraded yet)

This also fixes a minor bug in the deps.sh script, where it doesn't exit if fbthrift/folly fail to build
Closes https://github.com/facebook/proxygen/pull/15
Github Author: delow12 <dokovan@hotmail.com>

{sync, type="child", parent="github", parentrepo="facebook/proxygen", parentprnum="15", parentprfbid="991375867544448"}

Test Plan: Imported from GitHub, without a `Test Plan:` line.

Reviewed By: cgheorghe@fb.com

Subscribers: doug, bmatheny

FB internal diff: D1674609

Signature: t1:1674609:1415756820:a84f67d7932e7ca24c3212a8b29f7d7145addc48
Fix rare ByteEvents CHECK()

Summary:
If a ping reply is enqueued for egress and then the session is
torn down, it is possible that there is an outstanding byte event. Since
we already enforce relevant checks in HTTPSession about open transactions,
we know this isn't a leak. So, we can just clear any outstanding byte events.

Test Plan: unit tests, canary

Reviewed By: afrind@fb.com

Subscribers: doug, bmatheny

FB internal diff: D1676315

Tasks: 5368599

Signature: t1:1676315:1415819929:b91e02f8d7e5a035ec96dbbfe17ba2b76c7c81c6
expose some methods as virtual to make it pluggable to newer versions of the spec

Summary: no logic has changed, just some methods became virtual and with different visibility

Test Plan: unit test

Reviewed By: dcsommer@fb.com

Subscribers: trunkagent, doug, bmatheny, cgheorghe

FB internal diff: D1672319

Tasks: 5585851

Signature: t1:1672319:1415736266:cd2e5c948414983f0d58749ef3e864cf76244709
refactor StaticHeaderTable to allow plugging different header tables

Summary: move the static table outside the constructor and feed it as a parameter

Test Plan: compiled and ran the test

Reviewed By: dcsommer@fb.com, afrind@fb.com

Subscribers: trunkagent, doug, bmatheny, cgheorghe

FB internal diff: D1672322

Tasks: 5585851

Signature: t1:1672322:1415831762:ce851aabbd910229a4f8bfd612816378c0d74b64