libyui-rest-api
 
Loading...
Searching...
No Matches
YHttpServerSockets.h
1/*
2 Copyright (C) 2017 SUSE LLC
3
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2.1 of the
7 License, or (at your option) version 3.0 of the License. This library
8 is distributed in the hope that it will be useful, but WITHOUT ANY
9 WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11 License for more details. You should have received a copy of the GNU
12 Lesser General Public License along with this library; if not, write
13 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
14 Floor, Boston, MA 02110-1301 USA
15*/
16
17#ifndef YHttpServerSockets_h
18#define YHttpServerSockets_h
19
20#include <vector>
21
23{
24
25public:
26
27 typedef std::vector<int> Set;
28
29 Set read() {return _read;}
30 Set write() {return _write;}
31 Set exception() {return _exception;}
32
33 void add_read(int s) {_read.push_back(s);}
34 void add_write(int s) {_write.push_back(s);}
35 void add_exception(int s) {_exception.push_back(s);}
36
37 bool empty() { return _read.empty() && _write.empty() && _exception.empty();}
38
39private:
40
41 Set _read;
42 Set _write;
43 Set _exception;
44};
45
46#endif // YHttpServerSockets_h
Definition YHttpServerSockets.h:23