Request.
More...
#include <wpinet/uv/Request.h>
Request.
Requests are not moveable or copyable. This class provides shared_ptr ownership and shared_from_this.
◆ Type
◆ Request() [1/3]
wpi::uv::Request::Request |
( |
const Request & |
| ) |
|
|
delete |
◆ Request() [2/3]
wpi::uv::Request::Request |
( |
Request && |
| ) |
|
|
delete |
◆ ~Request()
virtual wpi::uv::Request::~Request |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ Request() [3/3]
wpi::uv::Request::Request |
( |
uv_req_t * |
uv_req | ) |
|
|
inlineexplicitprotected |
◆ Cancel()
bool wpi::uv::Request::Cancel |
( |
| ) |
|
|
inline |
Cancel a pending request.
This method fails if the request is executing or has finished executing. It can emit an error signal in case of errors.
- Returns
- True in case of success, false otherwise.
◆ GetRawReq() [1/2]
const uv_req_t * wpi::uv::Request::GetRawReq |
( |
| ) |
const |
|
inlinenoexcept |
Get the underlying request data structure.
- Returns
- The underlying request data structure.
◆ GetRawReq() [2/2]
uv_req_t * wpi::uv::Request::GetRawReq |
( |
| ) |
|
|
inlinenoexcept |
Get the underlying request data structure.
- Returns
- The underlying request data structure.
◆ GetType()
Type wpi::uv::Request::GetType |
( |
| ) |
const |
|
inlinenoexcept |
Get the type of the request.
A base request offers no functionality to promote it to the actual request type. By means of this function, the type of the underlying request as specified by Type is made available.
- Returns
- The actual type of the request.
◆ GetTypeName()
const char * wpi::uv::Request::GetTypeName |
( |
| ) |
const |
|
inlinenoexcept |
Get the name of the type of the request.
E.g. "connect" for connect.
◆ Keep()
virtual void wpi::uv::Request::Keep |
( |
| ) |
|
|
inlinevirtualnoexcept |
Keep this request in memory even if no outside shared_ptr references remain.
To release call Release().
Derived classes can override this method for different memory management approaches (e.g. pooled storage of requests).
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ RawSize()
size_t wpi::uv::Request::RawSize |
( |
| ) |
const |
|
inlinenoexcept |
Return the size of the underlying request type.
- Returns
- The size of the underlying request type.
◆ Release()
virtual void wpi::uv::Request::Release |
( |
| ) |
|
|
inlinevirtualnoexcept |
No longer force holding this request in memory.
Does not immediately destroy the object unless no outside shared_ptr references remain.
Derived classes can override this method for different memory management approaches (e.g. pooled storage of requests).
◆ ReportError()
void wpi::uv::Request::ReportError |
( |
int |
err | ) |
|
|
inline |
Report an error.
- Parameters
-
◆ error
std::function<void(Error)> wpi::uv::Request::error |
Error callback.
By default, this is set up to report errors to the handle that created this request.
- Parameters
-
The documentation for this class was generated from the following file: