|
uvw
2.1.0
|
Untyped handle class. More...
#include <loop.hpp>

Public Member Functions | |
| virtual HandleCategory | category () const noexcept=0 |
| Gets the category of the handle. More... | |
| virtual HandleType | type () const noexcept=0 |
| Gets the type of the handle. More... | |
| virtual bool | active () const noexcept=0 |
| Checks if the handle is active. More... | |
| virtual bool | closing () const noexcept=0 |
| Checks if a handle is closing or closed. More... | |
| virtual void | reference () noexcept=0 |
| Reference the given handle. More... | |
| virtual void | unreference () noexcept=0 |
| Unreference the given handle. More... | |
| virtual bool | referenced () const noexcept=0 |
| Checks if the given handle referenced. More... | |
| virtual void | close () noexcept=0 |
| Request handle to be closed. More... | |
Untyped handle class.
Handles' types are unknown from the point of view of the loop.
Anyway, a loop maintains a list of all the associated handles and let the users walk them as untyped instances.
This can help to end all the pending requests by closing the handles.
|
pure virtualnoexcept |
Checks if the handle is active.
What active means depends on the type of handle:
start().Rule of thumb: if a handle of type FooHandle has a start() member method, then it’s active from the moment that method is called. Likewise, stop() deactivates the handle again.
Implemented in uvw::Handle< T, U >, uvw::Handle< PollHandle, uv_poll_t >, uvw::Handle< CheckHandle, uv_check_t >, uvw::Handle< FsPollHandle, uv_fs_poll_t >, uvw::Handle< PrepareHandle, uv_prepare_t >, uvw::Handle< IdleHandle, uv_idle_t >, uvw::Handle< UDPHandle, uv_udp_t >, uvw::Handle< TimerHandle, uv_timer_t >, uvw::Handle< AsyncHandle, uv_async_t >, uvw::Handle< SignalHandle, uv_signal_t >, uvw::Handle< TCPHandle, uv_tcp_t >, uvw::Handle< FsEventHandle, uv_fs_event_t >, uvw::Handle< TTYHandle, uv_tty_t >, uvw::Handle< PipeHandle, uv_pipe_t >, and uvw::Handle< ProcessHandle, uv_process_t >.
|
pure virtualnoexcept |
Gets the category of the handle.
A base handle offers no functionality to promote it to the actual handle type. By means of this function, an opaque value that identifies the category of the handle is made available to the users.
Implemented in uvw::Handle< T, U >, uvw::Handle< PollHandle, uv_poll_t >, uvw::Handle< CheckHandle, uv_check_t >, uvw::Handle< FsPollHandle, uv_fs_poll_t >, uvw::Handle< PrepareHandle, uv_prepare_t >, uvw::Handle< IdleHandle, uv_idle_t >, uvw::Handle< UDPHandle, uv_udp_t >, uvw::Handle< TimerHandle, uv_timer_t >, uvw::Handle< AsyncHandle, uv_async_t >, uvw::Handle< SignalHandle, uv_signal_t >, uvw::Handle< TCPHandle, uv_tcp_t >, uvw::Handle< FsEventHandle, uv_fs_event_t >, uvw::Handle< TTYHandle, uv_tty_t >, uvw::Handle< PipeHandle, uv_pipe_t >, and uvw::Handle< ProcessHandle, uv_process_t >.
|
pure virtualnoexcept |
Request handle to be closed.
This must be called on each handle before memory is released.
In-progress requests are cancelled and this can result in an ErrorEvent emitted.
Implemented in uvw::Handle< T, U >, uvw::Handle< PollHandle, uv_poll_t >, uvw::Handle< CheckHandle, uv_check_t >, uvw::Handle< FsPollHandle, uv_fs_poll_t >, uvw::Handle< PrepareHandle, uv_prepare_t >, uvw::Handle< IdleHandle, uv_idle_t >, uvw::Handle< UDPHandle, uv_udp_t >, uvw::Handle< TimerHandle, uv_timer_t >, uvw::Handle< AsyncHandle, uv_async_t >, uvw::Handle< SignalHandle, uv_signal_t >, uvw::Handle< TCPHandle, uv_tcp_t >, uvw::Handle< FsEventHandle, uv_fs_event_t >, uvw::Handle< TTYHandle, uv_tty_t >, uvw::Handle< PipeHandle, uv_pipe_t >, and uvw::Handle< ProcessHandle, uv_process_t >.
|
pure virtualnoexcept |
Checks if a handle is closing or closed.
This function should only be used between the initialization of the handle and the arrival of the close callback.
Implemented in uvw::Handle< T, U >, uvw::Handle< PollHandle, uv_poll_t >, uvw::Handle< CheckHandle, uv_check_t >, uvw::Handle< FsPollHandle, uv_fs_poll_t >, uvw::Handle< PrepareHandle, uv_prepare_t >, uvw::Handle< IdleHandle, uv_idle_t >, uvw::Handle< UDPHandle, uv_udp_t >, uvw::Handle< TimerHandle, uv_timer_t >, uvw::Handle< AsyncHandle, uv_async_t >, uvw::Handle< SignalHandle, uv_signal_t >, uvw::Handle< TCPHandle, uv_tcp_t >, uvw::Handle< FsEventHandle, uv_fs_event_t >, uvw::Handle< TTYHandle, uv_tty_t >, uvw::Handle< PipeHandle, uv_pipe_t >, and uvw::Handle< ProcessHandle, uv_process_t >.
|
pure virtualnoexcept |
Reference the given handle.
References are idempotent, that is, if a handle is already referenced calling this function again will have no effect.
Implemented in uvw::Handle< T, U >, uvw::Handle< PollHandle, uv_poll_t >, uvw::Handle< CheckHandle, uv_check_t >, uvw::Handle< FsPollHandle, uv_fs_poll_t >, uvw::Handle< PrepareHandle, uv_prepare_t >, uvw::Handle< IdleHandle, uv_idle_t >, uvw::Handle< UDPHandle, uv_udp_t >, uvw::Handle< TimerHandle, uv_timer_t >, uvw::Handle< AsyncHandle, uv_async_t >, uvw::Handle< SignalHandle, uv_signal_t >, uvw::Handle< TCPHandle, uv_tcp_t >, uvw::Handle< FsEventHandle, uv_fs_event_t >, uvw::Handle< TTYHandle, uv_tty_t >, uvw::Handle< PipeHandle, uv_pipe_t >, and uvw::Handle< ProcessHandle, uv_process_t >.
|
pure virtualnoexcept |
Checks if the given handle referenced.
Implemented in uvw::Handle< T, U >, uvw::Handle< PollHandle, uv_poll_t >, uvw::Handle< CheckHandle, uv_check_t >, uvw::Handle< FsPollHandle, uv_fs_poll_t >, uvw::Handle< PrepareHandle, uv_prepare_t >, uvw::Handle< IdleHandle, uv_idle_t >, uvw::Handle< UDPHandle, uv_udp_t >, uvw::Handle< TimerHandle, uv_timer_t >, uvw::Handle< AsyncHandle, uv_async_t >, uvw::Handle< SignalHandle, uv_signal_t >, uvw::Handle< TCPHandle, uv_tcp_t >, uvw::Handle< FsEventHandle, uv_fs_event_t >, uvw::Handle< TTYHandle, uv_tty_t >, uvw::Handle< PipeHandle, uv_pipe_t >, and uvw::Handle< ProcessHandle, uv_process_t >.
|
pure virtualnoexcept |
Gets the type of the handle.
A base handle offers no functionality to promote it to the actual handle type. By means of this function, the type of the underlying handle as specified by HandleType is made available to the user.
Implemented in uvw::Handle< T, U >, uvw::Handle< PollHandle, uv_poll_t >, uvw::Handle< CheckHandle, uv_check_t >, uvw::Handle< FsPollHandle, uv_fs_poll_t >, uvw::Handle< PrepareHandle, uv_prepare_t >, uvw::Handle< IdleHandle, uv_idle_t >, uvw::Handle< UDPHandle, uv_udp_t >, uvw::Handle< TimerHandle, uv_timer_t >, uvw::Handle< AsyncHandle, uv_async_t >, uvw::Handle< SignalHandle, uv_signal_t >, uvw::Handle< TCPHandle, uv_tcp_t >, uvw::Handle< FsEventHandle, uv_fs_event_t >, uvw::Handle< TTYHandle, uv_tty_t >, uvw::Handle< PipeHandle, uv_pipe_t >, and uvw::Handle< ProcessHandle, uv_process_t >.
|
pure virtualnoexcept |
Unreference the given handle.
References are idempotent, that is, if a handle is not referenced calling this function again will have no effect.
Implemented in uvw::Handle< T, U >, uvw::Handle< PollHandle, uv_poll_t >, uvw::Handle< CheckHandle, uv_check_t >, uvw::Handle< FsPollHandle, uv_fs_poll_t >, uvw::Handle< PrepareHandle, uv_prepare_t >, uvw::Handle< IdleHandle, uv_idle_t >, uvw::Handle< UDPHandle, uv_udp_t >, uvw::Handle< TimerHandle, uv_timer_t >, uvw::Handle< AsyncHandle, uv_async_t >, uvw::Handle< SignalHandle, uv_signal_t >, uvw::Handle< TCPHandle, uv_tcp_t >, uvw::Handle< FsEventHandle, uv_fs_event_t >, uvw::Handle< TTYHandle, uv_tty_t >, uvw::Handle< PipeHandle, uv_pipe_t >, and uvw::Handle< ProcessHandle, uv_process_t >.
1.8.13