-
Notifications
You must be signed in to change notification settings - Fork 0
/
rdts_manager.h
40 lines (28 loc) · 1.05 KB
/
rdts_manager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//rdt session manager
#ifndef __RDTS_MANAGER_H__
#define __RDTS_MANAGER_H__
#include "rdt_session.h"
struct rdt_manager_s;
typedef struct rdt_manager_s rdt_manager_t;
rdt_manager_t *rdt_manager_create();
rdt_session_t *find_session(rdt_manager_t *mng, int sid, int enable);
rdt_session_t *get_disable_session(rdt_manager_t *mng, int sid);
rdt_session_t *create_session(rdt_manager_t *mng, int sid);
int delete_session(rdt_manager_t *mng, int sid);
int disable_session(rdt_manager_t *mng, int sid);
int ack_session(rdt_manager_t *mng, int sid);
int reconnect_session(rdt_manager_t *mng, int sid);
void on_session_reconnect(rdt_session_t *session);
// class SessionManager {
// public:
// rdt_session_t *GetSession(int sid);
// void CreateSession(int sid);
// int DeleteSession(int sid);
// int DisableSession(int sid);
// int AckSession(int sid);
// int ReconnectSession(int sid);
// void OnSessionReconnect(rdt_session_t *session);
// private:
// std::unordered_map<int, rdt_session_t *> session_ctx_;
// };
#endif //__RDTS_MANAGER_H__