uvw
3.1.0
Loading...
Searching...
No Matches
src
uvw
signal.h
1
#ifndef UVW_SIGNAL_INCLUDE_H
2
#define UVW_SIGNAL_INCLUDE_H
3
4
#include <uv.h>
5
#include "config.h"
6
#include "handle.hpp"
7
#include "loop.h"
8
9
namespace
uvw
{
10
12
struct
signal_event
{
13
explicit
signal_event
(
int
sig)
noexcept
;
14
15
int
signum
;
16
};
17
31
class
signal_handle
final:
public
handle
<signal_handle, uv_signal_t, signal_event> {
32
static
void
start_callback(uv_signal_t *hndl,
int
signum);
33
34
public
:
35
using
handle::handle;
36
41
int
init
() final;
42
51
int
start
(
int
signum);
52
62
int
one_shot
(
int
signum);
63
68
int
stop
();
69
74
int
signal
() const noexcept;
75
};
76
77
}
// namespace uvw
78
79
#ifndef UVW_AS_LIB
80
# include "signal.cpp"
81
#endif
82
83
#endif
// UVW_SIGNAL_INCLUDE_H
uvw::handle
Handle base class.
Definition:
handle.hpp:23
uvw::signal_handle
The signal handle.
Definition:
signal.h:31
uvw::signal_handle::one_shot
int one_shot(int signum)
Starts the handle.
uvw::signal_handle::signal
int signal() const noexcept
Gets the signal being monitored.
uvw::signal_handle::start
int start(int signum)
Starts the handle.
uvw::signal_handle::init
int init() final
Initializes the handle.
uvw::signal_handle::stop
int stop()
Stops the handle.
uvw
uvw default namespace.
Definition:
async.h:8
uvw::signal_event
Signal event.
Definition:
signal.h:12
uvw::signal_event::signum
int signum
Definition:
signal.h:15
Generated by
1.9.6