added Request::cancel
This commit is contained in:
parent
5f48173755
commit
78e6de086f
@ -17,6 +17,15 @@ protected:
|
||||
explicit Request(ResourceType<U> rt, std::shared_ptr<Loop> ref)
|
||||
: Resource<T>{std::move(rt), std::move(ref)}
|
||||
{ }
|
||||
|
||||
public:
|
||||
void cancel() noexcept {
|
||||
invoke(&uv_cancel, this->template get<uv_req_t>());
|
||||
}
|
||||
|
||||
std::size_t size() const noexcept {
|
||||
return uv_req_size(this->template get<uv_req_t>()->type);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user