mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-09 21:14:02 +00:00
FS-9775: First round of integration of DHT into libblade, requires ongoing changes to DHT for proper exposure to blade level
This commit is contained in:
committed by
Mike Jerris
parent
42bfcc3d46
commit
743a768a3f
@@ -34,6 +34,7 @@
|
||||
#ifndef _BLADE_H_
|
||||
#define _BLADE_H_
|
||||
#include <ks.h>
|
||||
#include <ks_dht.h>
|
||||
#include <sodium.h>
|
||||
#include "blade_types.h"
|
||||
#include "blade_stack.h"
|
||||
|
||||
@@ -35,9 +35,18 @@
|
||||
#define _BPCP_H_
|
||||
#include <blade.h>
|
||||
|
||||
#define BLADE_PEER_TPOOL_MIN 2
|
||||
#define BLADE_PEER_TPOOL_MAX 8
|
||||
#define BLADE_PEER_TPOOL_STACK (1024 * 256)
|
||||
#define BLADE_PEER_TPOOL_IDLE 10
|
||||
|
||||
KS_BEGIN_EXTERN_C
|
||||
KS_DECLARE(ks_status_t) blade_peer_create(blade_peer_t **bpP, ks_pool_t *pool);
|
||||
KS_DECLARE(ks_status_t) blade_peer_create(blade_peer_t **bpP, ks_pool_t *pool, ks_thread_pool_t *tpool, ks_dht_nodeid_t *nodeid);
|
||||
KS_DECLARE(ks_status_t) blade_peer_destroy(blade_peer_t **bpP);
|
||||
KS_DECLARE(ks_dht_nodeid_t *) blade_peer_myid(blade_peer_t *bp);
|
||||
KS_DECLARE(void) blade_peer_autoroute(blade_peer_t *bp, ks_bool_t autoroute, ks_port_t port);
|
||||
KS_DECLARE(ks_status_t) blade_peer_bind(blade_peer_t *bp, const ks_sockaddr_t *addr, ks_dht_endpoint_t **endpoint);
|
||||
KS_DECLARE(void) blade_peer_pulse(blade_peer_t *bp, int32_t timeout);
|
||||
KS_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,9 +35,18 @@
|
||||
#define _BLADE_STACK_H_
|
||||
#include <blade.h>
|
||||
|
||||
#define BLADE_HANDLE_TPOOL_MIN 2
|
||||
#define BLADE_HANDLE_TPOOL_MAX 8
|
||||
#define BLADE_HANDLE_TPOOL_STACK (1024 * 256)
|
||||
#define BLADE_HANDLE_TPOOL_IDLE 10
|
||||
|
||||
KS_BEGIN_EXTERN_C
|
||||
KS_DECLARE(ks_status_t) blade_handle_destroy(blade_handle_t **bhP);
|
||||
KS_DECLARE(ks_status_t) blade_handle_create(blade_handle_t **bhP, ks_pool_t *pool);
|
||||
KS_DECLARE(ks_status_t) blade_handle_create(blade_handle_t **bhP, ks_pool_t *pool, ks_thread_pool_t *tpool, const char *nodeid);
|
||||
KS_DECLARE(void) blade_handle_myid(blade_handle_t *bh, char *buffer);
|
||||
KS_DECLARE(void) blade_handle_autoroute(blade_handle_t *bh, ks_bool_t autoroute, ks_port_t port);
|
||||
KS_DECLARE(ks_status_t) blade_handle_bind(blade_handle_t *bh, const char *ip, ks_port_t port, ks_dht_endpoint_t **endpoint);
|
||||
KS_DECLARE(void) blade_handle_pulse(blade_handle_t *bh, int32_t timeout);
|
||||
KS_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user