TDME2 1.9.121
KernelEventMechanism.h
Go to the documentation of this file.
1#pragma once
2
3#include <tdme/tdme.h>
8
12
13/**
14 * Interface to kernel event mechanismns
15 * @author Andreas Drewke
16 */
18public:
19 /**
20 * @brief Public constructor
21 * @throws tdme::os::network::NetworkKEMException
22 */
24
25 /**
26 * @brief destructor
27 */
29
30 /**
31 * @brief initializes the kernel event mechanism
32 * @param maxCCU supported max ccu
33 * @throws tdme::os::network::NetworkKEMException
34 */
35 void initKernelEventMechanism(const unsigned int maxCCU) ;
36
37 /**
38 * @brief shutdowns the kernel event mechanism
39 */
41
42 /**
43 * @brief do the kernel event mechanism
44 * @return number of events
45 * @throws tdme::os::network::NetworkKEMException
46 */
48
49 /**
50 * @brief decodes a kernel event
51 * @param index kernel event index
52 * @param &interest kernel event io interest
53 * @param cookie kernel event cookie
54 * @throws tdme::os::network::NetworkKEMException
55 */
56 void decodeKernelEvent(const unsigned int index, NIOInterest &interest, void*& cookie);
57
58 /**
59 * @brief sets a non blocked socket io interest
60 * @param &socket socket
61 * @param lastInterest last nio interest
62 * @param interest nio interest
63 * @param cookie cookie
64 * @throws tdme::os::network::NetworkKEMException
65 */
66 void setSocketInterest(const NetworkSocket &socket, const NIOInterest lastInterest, const NIOInterest interest, const void* cookie);
67
68private:
69 //
71
72 // platform specific data
73 void* _psd;
74};
Interface to kernel event mechanismns.
void shutdownKernelEventMechanism()
shutdowns the kernel event mechanism
void setSocketInterest(const NetworkSocket &socket, const NIOInterest lastInterest, const NIOInterest interest, const void *cookie)
sets a non blocked socket io interest
int doKernelEventMechanism()
do the kernel event mechanism
void initKernelEventMechanism(const unsigned int maxCCU)
initializes the kernel event mechanism
void decodeKernelEvent(const unsigned int index, NIOInterest &interest, void *&cookie)
decodes a kernel event
Kernel event mechanism exception class.
Base class of network sockets.
Definition: NetworkSocket.h:17
uint8_t NIOInterest
type definiton for network UI interest
Definition: NIOInterest.h:10