From: Neel Goyal Date: Tue, 26 Jul 2016 15:09:18 +0000 (-0700) Subject: Refactor socket peeker X-Git-Tag: 2016.07.26~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5bb10c1ed568b5ee00e6699efdb86eae5561ddd7;p=folly.git Refactor socket peeker Summary: Refactor the socket peeker into its own class so that it can be used in other places as well, for example for peeking at plaintext traffic. Reviewed By: knekritz Differential Revision: D3521899 fbshipit-source-id: fcd5615dd5d7cd1ddece4c624efbdecfbbc88a09 --- diff --git a/folly/io/async/test/MockAsyncSocket.h b/folly/io/async/test/MockAsyncSocket.h index f7f9fee1..32c692ad 100644 --- a/folly/io/async/test/MockAsyncSocket.h +++ b/folly/io/async/test/MockAsyncSocket.h @@ -46,6 +46,8 @@ class MockAsyncSocket : public AsyncSocket { MOCK_CONST_METHOD0(good, bool()); MOCK_CONST_METHOD0(readable, bool()); MOCK_CONST_METHOD0(hangup, bool()); + MOCK_METHOD1(setPeek, void(bool)); + MOCK_METHOD1(setReadCB, void(ReadCallback*)); }; }}