0.4.00.4.10.4.2
|
Last change
on this file since f6fbf6f was
f6fbf6f,
checked in by Michael Medin <michael@…>, 3 years ago
|
|
|
-
Property mode set to
100644
|
|
File size:
972 bytes
|
| Line | |
|---|
| 1 | #include <nrpe/nrpepacket.hpp>
|
|---|
| 2 | #include <boost/tuple/tuple.hpp>
|
|---|
| 3 |
|
|---|
| 4 | namespace nrpe {
|
|---|
| 5 | namespace server {
|
|---|
| 6 | class handler {
|
|---|
| 7 | unsigned int payload_length_;
|
|---|
| 8 | bool allowArgs_;
|
|---|
| 9 | bool allowNasty_;
|
|---|
| 10 | bool noPerfData_;
|
|---|
| 11 | public:
|
|---|
| 12 | handler(unsigned int payload_length)
|
|---|
| 13 | : payload_length_(payload_length)
|
|---|
| 14 | {}
|
|---|
| 15 | handler(const handler &other) {
|
|---|
| 16 | payload_length_ = other.payload_length_;
|
|---|
| 17 | }
|
|---|
| 18 | handler& operator= (const handler &other) {
|
|---|
| 19 | payload_length_ = other.payload_length_;
|
|---|
| 20 | return *this;
|
|---|
| 21 | }
|
|---|
| 22 | unsigned int get_payload_length() {
|
|---|
| 23 | return payload_length_;
|
|---|
| 24 | }
|
|---|
| 25 | nrpe::packet handle(nrpe::packet packet);
|
|---|
| 26 | /*
|
|---|
| 27 | nrpe::packet handle(nrpe::packet packet) {
|
|---|
| 28 | return nrpe::packet::create_response(1, _T("HELLO!"), payload_length_);
|
|---|
| 29 | }
|
|---|
| 30 | */
|
|---|
| 31 | nrpe::packet create_error(std::wstring msg) {
|
|---|
| 32 | return nrpe::packet::create_response(4, msg, payload_length_);
|
|---|
| 33 | }
|
|---|
| 34 | };
|
|---|
| 35 |
|
|---|
| 36 | }// namespace server
|
|---|
| 37 | } // namespace nrpe
|
|---|
Note: See
TracBrowser
for help on using the repository browser.