#include <TestAsyncTransport.h>
Definition at line 22 of file TestAsyncTransport.h.
TestAsyncTransport::WriteEvent::~WriteEvent |
( |
| ) |
|
|
private |
void TestAsyncTransport::WriteEvent::destroyEvent |
( |
WriteEvent * |
event | ) |
|
|
staticprivate |
size_t TestAsyncTransport::WriteEvent::getCount |
( |
| ) |
const |
|
inline |
const struct iovec* TestAsyncTransport::WriteEvent::getIoVec |
( |
| ) |
const |
|
inline |
Definition at line 129 of file TestAsyncTransport.cpp.
References count, destroyEvent(), proxygen::getCurrentTime(), now(), and WriteEvent().
Referenced by TestAsyncTransport::writev().
132 void* buf = malloc(bufLen);
133 if (buf ==
nullptr) {
134 throw std::bad_alloc();
140 for (
size_t n = 0; n <
count; ++n) {
141 size_t len =
vec[n].iov_len;
142 event->vec_[n].iov_len = len;
144 event->vec_[n].iov_base =
nullptr;
148 event->vec_[n].iov_base = malloc(len);
149 if (event->vec_[n].iov_base ==
nullptr) {
150 throw std::bad_alloc();
152 memcpy(event->vec_[n].iov_base,
vec[n].iov_base, len);
WriteEvent(proxygen::TimePoint time, size_t count)
std::chrono::steady_clock::time_point now()
std::chrono::time_point< ClockType > getCurrentTime()
static void destroyEvent(WriteEvent *event)
size_t TestAsyncTransport::WriteEvent::count_ |
|
private |
struct iovec TestAsyncTransport::WriteEvent::vec_[] |
|
private |
The documentation for this class was generated from the following files: