|
uvw
1.5.0
|
The AsyncHandle handle. More...
#include <async.hpp>


Public Member Functions | |
| bool | init () |
| Initializes the handle. More... | |
| void | send () |
| Wakeups the event loop and emits the AsyncEvent event. More... | |
Public Member Functions inherited from uvw::Handle< AsyncHandle, uv_async_t > | |
| HandleCategory | category () const noexcept override |
| Gets the category of the handle. More... | |
| HandleType | type () const noexcept override |
| Gets the type of the handle. More... | |
| bool | active () const noexcept override |
| Checks if the handle is active. More... | |
| bool | closing () const noexcept override |
| Checks if a handle is closing or closed. More... | |
| void | close () noexcept override |
| Request handle to be closed. More... | |
| void | reference () noexcept override |
| Reference the given handle. More... | |
| void | unreference () noexcept override |
| Unreference the given handle. More... | |
| bool | referenced () const noexcept override |
| Checks if the given handle referenced. More... | |
| std::size_t | size () const noexcept |
| Returns the size of the underlying handle type. More... | |
| int | sendBufferSize () |
| Gets the size of the send buffer used for the socket. More... | |
| bool | sendBufferSize (int value) |
| Sets the size of the send buffer used for the socket. More... | |
| int | recvBufferSize () |
| Gets the size of the receive buffer used for the socket. More... | |
| bool | recvBufferSize (int value) |
| Sets the size of the receive buffer used for the socket. More... | |
| OSFileDescriptor | fileno () const |
| Gets the platform dependent file descriptor equivalent. More... | |
Public Member Functions inherited from uvw::UnderlyingType< AsyncHandle, uv_async_t > | |
| Loop & | loop () const noexcept |
| Gets the loop from which the resource was originated. More... | |
Public Member Functions inherited from uvw::Emitter< AsyncHandle > | |
| Connection< E > | on (Listener< E > f) |
| Registers a long-lived listener with the event emitter. More... | |
| Connection< E > | once (Listener< E > f) |
| Registers a short-lived listener with the event emitter. More... | |
| void | erase (Connection< E > conn) noexcept |
| Disconnects a listener from the event emitter. More... | |
| void | clear () noexcept |
| Disconnects all the listeners for the given event type. | |
| void | clear () noexcept |
| Disconnects all the listeners. | |
| bool | empty () const noexcept |
| Checks if there are listeners registered for the specific event. More... | |
| bool | empty () const noexcept |
| Checks if there are listeners registered with the event emitter. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from uvw::UnderlyingType< AsyncHandle, uv_async_t > | |
| static std::shared_ptr< AsyncHandle > | create (Args &&... args) |
| Creates a new resource of the given type. More... | |
The AsyncHandle handle.
Async handles allow the user to wakeup the event loop and get an event emitted from another thread.
To create an AsyncHandle through a Loop, no arguments are required.
|
inline |
|
inline |
Wakeups the event loop and emits the AsyncEvent event.
It’s safe to call this function from any thread.
An AsyncEvent event will be emitted on the loop thread.
See the official documentation for further details.
1.8.13