proxygen
MockByteEventTracker.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
10 #pragma once
11 
14 
15 namespace proxygen {
16 
18  public:
19  explicit MockByteEventTracker(Callback* callback)
20  : ByteEventTracker(callback) {}
21 
25  MOCK_METHOD0(drainByteEvents, size_t());
26  MOCK_METHOD2(processByteEvents, bool(std::shared_ptr<ByteEventTracker>,
27  uint64_t));
29  void(HTTPTransaction*, uint64_t));
31  void(HTTPTransaction*, uint64_t));
32  MOCK_METHOD3(preSend, uint64_t(bool*, bool*, uint64_t));
33 };
34 
35 }
void addFirstBodyByteEvent(uint64_t offset, HTTPTransaction *txn)
virtual uint64_t preSend(bool *, bool *, uint64_t)
virtual void addLastByteEvent(HTTPTransaction *txn, uint64_t byteNo) noexcept
MockByteEventTracker(Callback *callback)
requires E e noexcept(noexcept(s.error(std::move(e))))
void addPingByteEvent(size_t pingSize, TimePoint timestamp, uint64_t bytesScheduled)
GMOCK_METHOD2_(, noexcept,, addTrackedByteEvent, void(HTTPTransaction *, uint64_t))
virtual bool processByteEvents(std::shared_ptr< ByteEventTracker > self, uint64_t bytesWritten)
MOCK_METHOD3(addPingByteEvent, void(size_t, TimePoint, uint64_t))
MOCK_METHOD0(drainByteEvents, size_t())
MOCK_METHOD2(addFirstBodyByteEvent, void(uint64_t, HTTPTransaction *))
SteadyClock::time_point TimePoint
Definition: Time.h:25
virtual void addFirstHeaderByteEvent(uint64_t offset, HTTPTransaction *txn)
virtual size_t drainByteEvents()
virtual void addTrackedByteEvent(HTTPTransaction *txn, uint64_t byteNo) noexcept