|
uvw
1.11.0
|
#include <handle.hpp>


Public Member Functions | |
| 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< T, U > | |
| Loop & | loop () const noexcept |
| Gets the loop from which the resource was originated. More... | |
| const U * | raw () const noexcept |
| Gets the underlying raw data structure. More... | |
| U * | raw () noexcept |
| Gets the underlying raw data structure. More... | |
Public Member Functions inherited from uvw::Emitter< T > | |
| template<typename E > | |
| Connection< E > | on (Listener< E > f) |
| Registers a long-lived listener with the event emitter. More... | |
| template<typename E > | |
| Connection< E > | once (Listener< E > f) |
| Registers a short-lived listener with the event emitter. More... | |
| template<typename E > | |
| void | erase (Connection< E > conn) noexcept |
| Disconnects a listener from the event emitter. More... | |
| template<typename E > | |
| void | clear () noexcept |
| Disconnects all the listeners for the given event type. | |
| void | clear () noexcept |
| Disconnects all the listeners. | |
| template<typename E > | |
| 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< T, U > | |
| template<typename... Args> | |
| static std::shared_ptr< T > | create (Args &&... args) |
| Creates a new resource of the given type. More... | |
Handle base class.
Base type for all uvw handle types.
Definition at line 29 of file handle.hpp.
|
inlineoverridevirtualnoexcept |
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.
Implements uvw::BaseHandle.
Definition at line 114 of file handle.hpp.
|
inlineoverridevirtualnoexcept |
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.
Implements uvw::BaseHandle.
Definition at line 78 of file handle.hpp.
|
inlineoverridevirtualnoexcept |
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.
The handle will emit a CloseEvent when finished.
Implements uvw::BaseHandle.
Definition at line 139 of file handle.hpp.
|
inlineoverridevirtualnoexcept |
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.
Implements uvw::BaseHandle.
Definition at line 126 of file handle.hpp.
|
inline |
Gets the platform dependent file descriptor equivalent.
Supported handles:
It will emit an ErrorEvent event if invoked on any other handle.
If a handle doesn’t have an attached file descriptor yet or the handle itself has been closed, an ErrorEvent event will be emitted.
See the official documentation for further details.
Definition at line 267 of file handle.hpp.
|
inline |
Gets the size of the receive buffer used for the socket.
Gets the size of the receive buffer that the operating system uses for the socket.
This function works for TcpHandle, PipeHandle and UDPHandle handles on Unix and for TcpHandle and UDPHandle handles on Windows.
Note that Linux will return double the size of the original set value.
Definition at line 224 of file handle.hpp.
|
inline |
Sets the size of the receive buffer used for the socket.
Sets the size of the receive buffer that the operating system uses for the socket.
This function works for TcpHandle, PipeHandle and UDPHandle handles on Unix and for TcpHandle and UDPHandle handles on Windows.
Note that Linux will set double the size.
Definition at line 241 of file handle.hpp.
|
inlineoverridevirtualnoexcept |
Reference the given handle.
References are idempotent, that is, if a handle is already referenced calling this function again will have no effect.
Implements uvw::BaseHandle.
Definition at line 151 of file handle.hpp.
|
inlineoverridevirtualnoexcept |
Checks if the given handle referenced.
Implements uvw::BaseHandle.
Definition at line 169 of file handle.hpp.
|
inline |
Gets the size of the send buffer used for the socket.
Gets the size of the send buffer that the operating system uses for the socket.
This function works for TcpHandle, PipeHandle and UDPHandle handles on Unix and for TcpHandle and UDPHandle handles on Windows.
Note that Linux will return double the size of the original set value.
Definition at line 192 of file handle.hpp.
|
inline |
Sets the size of the send buffer used for the socket.
Sets the size of the send buffer that the operating system uses for the socket.
This function works for TcpHandle, PipeHandle and UDPHandle handles on Unix and for TcpHandle and UDPHandle handles on Windows.
Note that Linux will set double the size.
Definition at line 209 of file handle.hpp.
|
inlinenoexcept |
Returns the size of the underlying handle type.
Definition at line 177 of file handle.hpp.
|
inlineoverridevirtualnoexcept |
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 users.
Implements uvw::BaseHandle.
Definition at line 91 of file handle.hpp.
|
inlineoverridevirtualnoexcept |
Unreference the given handle.
References are idempotent, that is, if a handle is not referenced calling this function again will have no effect.
Implements uvw::BaseHandle.
Definition at line 161 of file handle.hpp.
1.8.13