25 using namespace folly;
33 using PeekingAcceptorHandshakeHelper::PeekCallback::PeekCallback;
38 const std::vector<uint8_t>&,
40 std::chrono::steady_clock::time_point,
44 const std::vector<uint8_t>& peekedBytes,
46 std::chrono::steady_clock::time_point acceptTime,
49 getHelperInternal(peekedBytes, clientAddr, acceptTime, tinfo));
62 peekCallbacks_.push_back(&mockPeekCallback1_);
63 peekCallbacks_.push_back(&mockPeekCallback2_);
98 std::vector<uint8_t> buf(2);
102 .WillOnce(
Return(helperPtr_.release()));
104 helper_->peekSuccess(buf);
110 std::vector<uint8_t> buf(2);
114 .WillOnce(
Return(
nullptr));
116 .WillOnce(
Return(
nullptr));
118 helper_->peekSuccess(buf);
124 std::vector<uint8_t> buf(2);
128 .WillOnce(
Return(
nullptr));
130 .WillOnce(
Return(helperPtr_.release()));
132 helper_->peekSuccess(buf);
139 .WillOnce(SaveArg<0>(&rcb));
151 AsyncSocketException::AsyncSocketExceptionType::END_OF_FILE,
163 helper_->dropConnection();
168 std::vector<uint8_t> buf(2);
174 .WillOnce(
Return(helperPtr_.release()));
176 helper_->peekSuccess(buf);
179 helper_->dropConnection();
#define MOCK_METHOD4_T(m,...)
GTEST_API_ Cardinality AtLeast(int n)
constexpr detail::Map< Move > move
std::chrono::steady_clock::time_point now()
MockHandshakeHelper< UseSharedPtrPolicy > * innerHelper_
wangle::AcceptorHandshakeHelper::UniquePtr getHelper(const std::vector< uint8_t > &peekedBytes, const folly::SocketAddress &clientAddr, std::chrono::steady_clock::time_point acceptTime, TransportInfo &tinfo) override
—— Concurrent Priority Queue Implementation ——
AcceptorHandshakeHelper::UniquePtr helperPtr_
std::unique_ptr< AsyncSSLSocket, Destructor > UniquePtr
folly::Synchronized< EventBase * > base_
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
std::shared_ptr< SSLContext > SSLContextPtr
AsyncSSLSocket::UniquePtr sockPtr_
std::vector< PeekingCallbackPtr > peekCallbacks_
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
StrictMock< MockHandshakeHelperCallback<> > callback_
folly::Function< void()> callback_
TEST_F(FileUtilTest, read)
PeekingAcceptorHandshakeHelper * helper_
MockAsyncSSLSocket * sslSock_
std::unique_ptr< AcceptorHandshakeHelper, folly::DelayedDestruction::Destructor > UniquePtr
virtual void readEOF() noexcept=0
#define ASSERT_TRUE(condition)
internal::ReturnAction< R > Return(R value)