Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
net_recon.h
Go to the documentation of this file.
1 
11 #ifndef NET_RECON_H
12 #define NET_RECON_H
13 
14 #include <pbl.h>
15 #include "net_com.h"
16 #include "modules/cque.h"
17 
19 
24 
26  void *kco;
27  PblMap* map;
28 
29  // Public methods
30 
40  int (*send)(ksnReconnectClass *rec, const char *peer);
41 
53  int (*sendAnswer)(ksnReconnectClass *rec, const char *peer,
54  const char* peer_to_reconnect);
55 
66 
77 
87 
93  void (*destroy)(ksnReconnectClass *rec);
94 
95 };
96 
97 #ifdef __cplusplus
98 extern "C" {
99 #endif
100 
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif /* NET_RECON_H */
PblMap * map
Hash Map to store reconnect requests.
Definition: net_recon.h:27
int(* sendAnswer)(ksnReconnectClass *rec, const char *peer, const char *peer_to_reconnect)
Send CMD_RECONNECT_ANSWER command to r-host.
Definition: net_recon.h:53
void * kco
Pointer to ksnCommandClass.
Definition: net_recon.h:26
ksnCQueCallback callback
CallbackQueue callback.
Definition: net_recon.h:86
void(* ksnCQueCallback)(uint32_t id, int type, void *data)
ksnCQue callback function definition
Definition: cque.h:34
KSNet core received data structure.
Definition: net_com.h:107
#define rd
void(* destroy)(ksnReconnectClass *rec)
Destroy ksnReconnectClass.
Definition: net_recon.h:93
int(* send)(ksnReconnectClass *rec, const char *peer)
Send CMD_RECONNECT command to r-host.
Definition: net_recon.h:40
int(* processAnswer)(ksnReconnectClass *rec, ksnCorePacketData *rd)
Process CMD_RECONNECT_ANSWER command.
Definition: net_recon.h:76
ksnReconnectClass * ksnReconnectInit(void *kco)
Initialize ksnReconnectClass.
Definition: net_recon.c:350
int(* process)(ksnReconnectClass *rec, ksnCorePacketData *rd)
Process CMD_RECONNECT command.
Definition: net_recon.h:65
ksnReconnectClass definition
Definition: net_recon.h:23