mirror of
https://gitlab.com/niansa/quickipc.git
synced 2025-03-06 20:49:18 +01:00
Gave it another try, but a better one this time
This commit is contained in:
parent
4f279349df
commit
0b8d12f528
1 changed files with 7 additions and 3 deletions
|
@ -33,6 +33,9 @@ private:
|
|||
int raw_fds[2] = {-1, -1};
|
||||
|
||||
public:
|
||||
static constexpr size_t default_max_buflen = 4000;
|
||||
size_t max_buflen;
|
||||
|
||||
auto get_in() const {
|
||||
return raw_fds[0];
|
||||
}
|
||||
|
@ -40,14 +43,15 @@ public:
|
|||
return raw_fds[1];
|
||||
}
|
||||
|
||||
QIPC(int in, int out) {
|
||||
QIPC(int in, int out, size_t max_buflen = default_max_buflen)
|
||||
: max_buflen(max_buflen) {
|
||||
raw_fds[0] = in;
|
||||
raw_fds[1] = out;
|
||||
}
|
||||
QIPC() {}
|
||||
QIPC(size_t max_buflen = default_max_buflen) : max_buflen(max_buflen) {}
|
||||
QIPC(const QIPC&) = delete;
|
||||
QIPC(const QIPC&& o) {
|
||||
QIPC(o.get_in(), o.get_out());
|
||||
QIPC(o.get_in(), o.get_out(), o.max_buflen);
|
||||
}
|
||||
|
||||
auto operator =(const QIPC& o) {
|
||||
|
|
Loading…
Add table
Reference in a new issue