24 static std::shared_ptr<WriteEvent>
newEvent(
const struct iovec*
vec,
51 void setReadCB(AsyncTransportWrapper::ReadCallback* callback)
override;
53 void write(AsyncTransportWrapper::WriteCallback* callback,
54 const void* buf,
size_t bytes,
57 void writev(AsyncTransportWrapper::WriteCallback* callback,
58 const struct iovec*
vec,
size_t count,
61 void writeChain(AsyncTransportWrapper::WriteCallback* callback,
62 std::unique_ptr<folly::IOBuf>&& iob,
65 void close()
override;
73 bool good()
const override;
76 bool error()
const override;
86 std::chrono::milliseconds delayFromPrevious);
88 std::chrono::milliseconds delayFromPrevious);
90 std::chrono::milliseconds delayFromPrevious=
91 std::chrono::milliseconds(0));
92 void addReadEOF(std::chrono::milliseconds delayFromPrevious);
94 std::chrono::milliseconds delayFromPrevious);
137 void addReadEvent(
const std::shared_ptr<ReadEvent>& event);
156 std::deque< std::pair<std::shared_ptr<WriteEvent>, AsyncTransportWrapper::WriteCallback*>>
void attachEventBase(folly::EventBase *eventBase) override
std::deque< std::shared_ptr< WriteEvent > > writeEvents_
void shutdownWrite() override
void detachEventBase() override
size_t getAppBytesWritten() const override
folly::EventBase * getEventBase() const override
folly::EventBase * eventBase_
void addReadError(const folly::AsyncSocketException &ex, std::chrono::milliseconds delayFromPrevious)
proxygen::TimePoint getTime() const
uint32_t getSendTimeout() const override
WriteEvent(proxygen::TimePoint time, size_t count)
void setSendTimeout(uint32_t milliseconds) override
std::chrono::steady_clock::time_point now()
ReadCallback * getReadCallback() const override
void writeChain(AsyncTransportWrapper::WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&iob, folly::WriteFlags flags=folly::WriteFlags::NONE) override
std::deque< std::shared_ptr< WriteEvent > > * getWriteEvents()
requires E e noexcept(noexcept(s.error(std::move(e))))
void setEorTracking(bool) override
bool error() const override
void addReadEvent(const void *buf, size_t buflen, std::chrono::milliseconds delayFromPrevious)
static std::shared_ptr< WriteEvent > newEvent(const struct iovec *vec, size_t count)
void shutdownWriteNow() override
bool readable() const override
void timeoutExpired() noexceptoverride
const struct iovec * getIoVec() const
SocketAddress getPeerAddress() const
TestAsyncTransport & operator=(TestAsyncTransport const &)
bool connecting() const override
bool writesAllowed() const
size_t getRawBytesReceived() const override
std::deque< std::pair< std::shared_ptr< WriteEvent >, AsyncTransportWrapper::WriteCallback * > > pendingWriteEvents_
proxygen::TimePoint nextReadEventTime_
bool isDetachable() const override
proxygen::TimePoint time_
size_t getRawBytesWritten() const override
size_t getAppBytesReceived() const override
SocketAddress getLocalAddress() const
SteadyClock::time_point TimePoint
void setReadCB(AsyncTransportWrapper::ReadCallback *callback) override
bool good() const override
proxygen::TimePoint prevReadEventTime_
std::deque< std::shared_ptr< ReadEvent > > readEvents_
void addReadEOF(std::chrono::milliseconds delayFromPrevious)
void writev(AsyncTransportWrapper::WriteCallback *callback, const struct iovec *vec, size_t count, folly::WriteFlags flags=folly::WriteFlags::NONE) override
folly::AsyncTransportWrapper::ReadCallback * readCallback_
bool isEorTrackingEnabled() const override
static void destroyEvent(WriteEvent *event)
void write(AsyncTransportWrapper::WriteCallback *callback, const void *buf, size_t bytes, folly::WriteFlags flags=folly::WriteFlags::NONE) override
ThreadPoolListHook * addr
TestAsyncTransport(folly::EventBase *eventBase)
std::chrono::nanoseconds time()
void scheduleNextReadEvent(proxygen::TimePoint now)