refactor(session manager): turning the session manager into a stellar module
This commit is contained in:
27
include/stellar/session_manager.h
Normal file
27
include/stellar/session_manager.h
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "stellar/exdata.h"
|
||||
#include "stellar/session.h"
|
||||
|
||||
struct session_manager;
|
||||
|
||||
int session_manager_new_packet_exdata_index(struct session_manager *sess_mgr, const char *name, exdata_free *func, void *arg);
|
||||
|
||||
typedef void on_session_callback(struct session *sess, struct packet *pkt, void *args);
|
||||
typedef void on_tcp_stream_callback(struct session *sess, const char *tcp_payload, uint32_t tcp_payload_len, void *args);
|
||||
|
||||
int session_manager_subscribe_tcp(struct session_manager *sess_mgr, on_session_callback *cb, void *args);
|
||||
int session_manager_subscribe_udp(struct session_manager *sess_mgr, on_session_callback *cb, void *args);
|
||||
int session_manager_subscribe_control_packet(struct session_manager *sess_mgr, on_session_callback *cb, void *args);
|
||||
int session_manager_subscribe_tcp_stream(struct session_manager *sess_mgr, on_tcp_stream_callback *cb, void *args);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user