Seastar
High performance C++ framework for concurrent servers
|
Classes | |
struct | speculation |
Public Member Functions | |
pollable_fd_state (const pollable_fd_state &)=delete | |
void | operator= (const pollable_fd_state &)=delete |
void | speculate_epoll (int events) |
bool | take_speculation (int events) |
future< size_t > | read_some (char *buffer, size_t size) |
future< size_t > | read_some (uint8_t *buffer, size_t size) |
future< size_t > | read_some (const std::vector< iovec > &iov) |
future< temporary_buffer< char > > | read_some (internal::buffer_allocator *ba) |
future | write_all (const char *buffer, size_t size) |
future | write_all (const uint8_t *buffer, size_t size) |
future< size_t > | write_some (net::packet &p) |
future | write_all (net::packet &p) |
future | readable () |
future | writeable () |
future | readable_or_writeable () |
future< std::tuple< pollable_fd, socket_address > > | accept () |
future | connect (socket_address &sa) |
future< temporary_buffer< char > > | recv_some (internal::buffer_allocator *ba) |
future< size_t > | sendmsg (struct msghdr *msg) |
future< size_t > | recvmsg (struct msghdr *msg) |
future< size_t > | sendto (socket_address addr, const void *buf, size_t len) |
future | poll_rdhup () |
Public Attributes | |
file_desc | fd |
bool | events_rw = false |
unsigned | shutdown_mask = 0 |
int | events_requested = 0 |
int | events_epoll = 0 |
int | events_known = 0 |
Protected Member Functions | |
pollable_fd_state (file_desc fd, speculation speculate=speculation()) | |
|
inline |
Set the speculation of specified I/O events
We try to speculate. If an I/O is completed successfully without being blocked and it didn't return the short read/write. We anticipate that the next I/O will also be non-blocking and will not return EAGAIN. But the speculation is invalidated once it is "used" by take_speculation()
|
inline |
Check whether we speculate specified I/O is possible on the fd, invalidate the speculation if it matches with all specified events
.