Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ksnReconnectClass Struct Reference

ksnReconnectClass definition More...

#include <net_recon.h>

Data Fields

ksnReconnectClassthis
 Pointer to this class. More...
 
void * kco
 Pointer to ksnCommandClass. More...
 
PblMap * map
 Hash Map to store reconnect requests. More...
 
int(* send )(ksnReconnectClass *rec, const char *peer)
 Send CMD_RECONNECT command to r-host. More...
 
int(* sendAnswer )(ksnReconnectClass *rec, const char *peer, const char *peer_to_reconnect)
 Send CMD_RECONNECT_ANSWER command to r-host. More...
 
int(* process )(ksnReconnectClass *rec, ksnCorePacketData *rd)
 Process CMD_RECONNECT command. More...
 
int(* processAnswer )(ksnReconnectClass *rec, ksnCorePacketData *rd)
 Process CMD_RECONNECT_ANSWER command. More...
 
ksnCQueCallback callback
 CallbackQueue callback. More...
 
void(* destroy )(ksnReconnectClass *rec)
 Destroy ksnReconnectClass. More...
 

Detailed Description

ksnReconnectClass definition

Field Documentation

ksnCQueCallback ksnReconnectClass::callback

CallbackQueue callback.

Parameters
idCalls ID
typeType: 0 - timeout callback; 1 - successful callback
dataUser data selected in ksnCQueAdd function
void(* ksnReconnectClass::destroy)(ksnReconnectClass *rec)

Destroy ksnReconnectClass.

Parameters
thisPointer to ksnReconnectClass
void* ksnReconnectClass::kco

Pointer to ksnCommandClass.

PblMap* ksnReconnectClass::map

Hash Map to store reconnect requests.

int(* ksnReconnectClass::process)(ksnReconnectClass *rec, ksnCorePacketData *rd)

Process CMD_RECONNECT command.

Got by r-host from peer wanted reconnect with peer rd->data

Parameters
thisPointer to ksnReconnectClass
rdPointer to ksnCorePacketData
Returns
int(* ksnReconnectClass::processAnswer)(ksnReconnectClass *rec, ksnCorePacketData *rd)

Process CMD_RECONNECT_ANSWER command.

Got from r-host if peer to reconnect has not connected to r-host

Parameters
thisPointer to ksnReconnectClass
rdPointer to ksnCorePacketData
Returns
int(* ksnReconnectClass::send)(ksnReconnectClass *rec, const char *peer)

Send CMD_RECONNECT command to r-host.

Parameters
thisPointer to ksnReconnectClass
peerPeer name to reconnect
Returns
Zero if success or error
Return values
0Send command successfully
-1Has not connected to r-host
int(* ksnReconnectClass::sendAnswer)(ksnReconnectClass *rec, const char *peer, const char *peer_to_reconnect)

Send CMD_RECONNECT_ANSWER command to r-host.

Parameters
thisPointer to ksnReconnectClass
peerPeer name to send
peer_to_reconnectPeer name to reconnect
Returns
Zero if success or error
Return values
0Send command successfully
-1Has not connected to peer
-2This class has not initialized yet
ksnReconnectClass* ksnReconnectClass::this

Pointer to this class.


The documentation for this struct was generated from the following file: