5#ifndef WPINET_UV_POLL_H_ 
    6#define WPINET_UV_POLL_H_ 
   25  struct private_init {};
 
   28  explicit Poll(
const private_init&) {}
 
   29  ~Poll() noexcept override = default;
 
   64  static std::shared_ptr<Poll> 
CreateSocket(
const std::shared_ptr<Loop>& loop,
 
 
   79  void Reuse(
int fd, std::function<
void()> callback);
 
  113    std::function<void()> callback;
 
  118  std::unique_ptr<ReuseData> m_reuseData;
 
 
SignalBase is an implementation of the observer pattern, through the use of an emitting object and sl...
Definition Signal.h:495
bool Invoke(F &&f, Args &&... args) const
Definition Handle.h:267
Handle.
Definition Handle.h:290
uv_poll_t * GetRaw() const noexcept
Definition Handle.h:305
Event loop.
Definition Loop.h:37
Poll handle.
Definition Poll.h:24
sig::Signal< int > pollEvent
Signal generated when a poll event occurs.
Definition Poll.h:109
~Poll() noexcept override=default
void Start(int events)
Start polling the file descriptor.
static std::shared_ptr< Poll > CreateSocket(Loop &loop, uv_os_sock_t sock)
Create a poll handle using a socket descriptor.
void ReuseSocket(uv_os_sock_t sock, std::function< void()> callback)
Reuse this handle.
Poll(const private_init &)
Definition Poll.h:28
static std::shared_ptr< Poll > CreateSocket(const std::shared_ptr< Loop > &loop, uv_os_sock_t sock)
Create a poll handle using a socket descriptor.
Definition Poll.h:64
static std::shared_ptr< Poll > Create(Loop &loop, int fd)
Create a poll handle using a file descriptor.
void Reuse(int fd, std::function< void()> callback)
Reuse this handle.
void Stop()
Stop polling the file descriptor.
Definition Poll.h:104
Implement std::hash so that hash_code can be used in STL containers.
Definition PointerIntPair.h:280
UV_EXTERN int uv_poll_stop(uv_poll_t *handle)
SOCKET uv_os_sock_t
Definition win.h:244