proxygen
ScheduledEvent Struct Reference

Public Member Functions

void perform (int fd)
 

Public Attributes

int milliseconds
 
uint16_t events
 
size_t length
 
ssize_t result
 

Detailed Description

Definition at line 112 of file EventBaseTest.cpp.

Member Function Documentation

void ScheduledEvent::perform ( int  fd)
inline

Definition at line 118 of file EventBaseTest.cpp.

References readFromFD(), readUntilEmpty(), writeToFD(), and writeUntilFull().

Referenced by scheduleEvents().

118  {
119  if (events & EventHandler::READ) {
120  if (length == 0) {
121  result = readUntilEmpty(fd);
122  } else {
123  result = readFromFD(fd, length);
124  }
125  }
126  if (events & EventHandler::WRITE) {
127  if (length == 0) {
128  result = writeUntilFull(fd);
129  } else {
130  result = writeToFD(fd, length);
131  }
132  }
133  }
size_t writeUntilFull(int fd)
ssize_t writeToFD(int fd, size_t length)
size_t readUntilEmpty(int fd)
ssize_t readFromFD(int fd, size_t length)

Member Data Documentation

uint16_t ScheduledEvent::events

Definition at line 114 of file EventBaseTest.cpp.

size_t ScheduledEvent::length

Definition at line 115 of file EventBaseTest.cpp.

Referenced by TEST().

int ScheduledEvent::milliseconds

Definition at line 113 of file EventBaseTest.cpp.

Referenced by scheduleEvents().

ssize_t ScheduledEvent::result

Definition at line 116 of file EventBaseTest.cpp.

Referenced by TEST().


The documentation for this struct was generated from the following file: