source: nscp/modules/NRPEListener/NRPESocket.h @ 1eef1ee

0.4.00.4.10.4.2stable
Last change on this file since 1eef1ee was 1eef1ee, checked in by Michael Medin <michael@…>, 8 years ago

*OBS* This might no longer work! (expect updated code in the next few days if things are broken)

  • Fundamental API changes (due to NRPE compatibility)
    • HandleCommand? has changed
    • Inject has changed
    • Most API calls have new "return codes" (typedef:ed INT to allow for return code compiler checks)
    • A lot of the old return codes have changed
  • Preliminary NRPE support (can parse and execute incoming requests, cant return data yet, and no encryption)
  • New SimpleSocket? in include/ will be used as base class for Listeners
  • A lot of rewrite to the NSC API
  • Property mode set to 100644
File size: 1.1 KB
Line 
1#pragma once
2#include "resource.h"
3#include <Thread.h>
4#include <Mutex.h>
5#include <WinSock2.h>
6#include <Socket.h>
7/**
8 * @ingroup NSClient++
9 * Socket responder class.
10 * This is a background thread that listens to the socket and executes incoming commands.
11 *
12 * @version 1.0
13 * first version
14 *
15 * @date 02-12-2005
16 *
17 * @author mickem
18 *
19 * @par license
20 * This code is absolutely free to use and modify. The code is provided "as is" with
21 * no expressed or implied warranty. The author accepts no liability if it causes
22 * any damage to your computer, causes your pet to fall ill, increases baldness
23 * or makes your car start emitting strange noises when you start it up.
24 * This code has no bugs, just undocumented features!
25 *
26 * @todo This is not very well written and should probably be reworked.
27 *
28 * @bug
29 *
30 */
31
32#define DEFAULT_NRPE_PORT 5666
33
34
35class NRPESocket : public SimpleSocketListsner {
36private:
37
38public:
39        NRPESocket();
40        virtual ~NRPESocket();
41
42private:
43        virtual void onAccept(SOCKET client);
44};
45
46
47typedef Thread<NRPESocket> NRPESocketThread; // Thread manager
48
49
Note: See TracBrowser for help on using the repository browser.