Read from a pipe in an async manner.
Declared in <folly/io/async/AsyncPipe.h>
class AsyncPipeReader
: public EventHandler
, public AsyncReader
, public DelayedDestruction
| Name | Description |
|---|---|
EventHandler | The EventHandler class is used to asynchronously wait for events on a file descriptor. |
AsyncReader | Interface for the read side of an asynchronous transport. |
DelayedDestruction | DelayedDestruction is a helper class to ensure objects are not deleted while they still have functions executing in a higher stack frame. |
| Name | Description |
|---|---|
Destructor | Helper class to allow DelayedDestruction classes to be used with std::shared_ptr. |
DestructorGuard | Classes should create a DestructorGuard object on the stack in any function that may invoke callback functions. |
IntrusivePtr | This smart pointer is a convenient way to manage a concrete DelayedDestructorBase child. It can replace the equivalent raw pointer and provide automatic memory management. |
ReadCallback | Callback interface used to receive data read from the transport. |
| Name | Description |
|---|---|
UniquePtr | Smart pointer type that destroys the reader through DelayedDestruction. |
| Name | Description |
|---|---|
EventFlags | Bitset flags describing the I/O events a handler can wait for. |
| Name | Description |
|---|---|
AsyncPipeReader [constructor] | Construct an AsyncPipeReader for the given pipe file descriptor. |
operator= | Assignment operators |
activateEvent | Make an event active. |
attachEventBase | Attach the handler to a EventBase. |
changeHandlerFD | Change the file descriptor that this handler is associated with. |
destroy [virtual] | destroy() requests destruction of the object. |
detachEventBase | Detach the handler from its EventBase. |
getDestroyPending | Returns whether destruction has been requested but deferred. |
getReadCallback [virtual] | Get the read callback |
getRegisteredEvents | Return the set of events that we're currently registered for. |
handlerReady [virtual] | handlerReady() is invoked when the handler is ready. |
initHandler | Attach the handler to a EventBase, and change the file descriptor. |
isHandlerRegistered | Returns true if the handler is currently registered. |
isPending | Returns true if the handler is registered but has not yet fired. |
registerHandler | Register the handler. |
registerInternalHandler | Register the handler as an internal event. |
setCloseCallback | Set a special hook to close the socket (otherwise, will call close()) |
setEdgeTriggered | If supported by the backend updates the event to be edge-triggered. Returns true iff the update was successful. |
setReadCB | setReadCB overloads |
takePreReceivedData [virtual] | Take any data received before a read callback was installed. |
unregisterHandler | Unregister the handler, if it is registered. |
| Name | Description |
|---|---|
newReader | Create a new AsyncPipeReader managed by a UniquePtr. |
| Name | Description |
|---|---|
getDestructorGuardCount | Get the number of DestructorGuards currently protecting this object. |
onDelayedDestroy [virtual] | Implement onDelayedDestroy in subclasses. onDelayedDestroy() is invoked when the object is potentially being destroyed. |