mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 21:22:09 +00:00
FS-10167: Switched connection lifecycle to an isolated pool similar to sessions, also refactored the inner WSS transport implementation to be part of the same pool so it is cleaned up with the connection. Switched the connection state machine thread to also utilize thread pool to avoid direct ownership over the thread, similar to session but without the use of a signaled condition due to abstraction of transports which may need to deal with polling for socket events such as with WSS transport. Completely removed the temporary worker thread in the main handle that was for connection/session cleanup.
This commit is contained in:
@@ -36,10 +36,7 @@
|
||||
#include <blade.h>
|
||||
|
||||
KS_BEGIN_EXTERN_C
|
||||
KS_DECLARE(ks_status_t) blade_connection_create(blade_connection_t **bcP,
|
||||
blade_handle_t *bh,
|
||||
void *transport_data,
|
||||
blade_transport_callbacks_t *transport_callbacks);
|
||||
KS_DECLARE(ks_status_t) blade_connection_create(blade_connection_t **bcP, blade_handle_t *bh);
|
||||
KS_DECLARE(ks_status_t) blade_connection_destroy(blade_connection_t **bcP);
|
||||
KS_DECLARE(ks_status_t) blade_connection_startup(blade_connection_t *bc, blade_connection_direction_t direction);
|
||||
KS_DECLARE(ks_status_t) blade_connection_shutdown(blade_connection_t *bc);
|
||||
@@ -50,9 +47,8 @@ KS_DECLARE(ks_status_t) blade_connection_read_lock(blade_connection_t *bc, ks_bo
|
||||
KS_DECLARE(ks_status_t) blade_connection_read_unlock(blade_connection_t *bc);
|
||||
KS_DECLARE(ks_status_t) blade_connection_write_lock(blade_connection_t *bc, ks_bool_t block);
|
||||
KS_DECLARE(ks_status_t) blade_connection_write_unlock(blade_connection_t *bc);
|
||||
KS_DECLARE(void *) blade_connection_transport_init_get(blade_connection_t *bc);
|
||||
KS_DECLARE(void *) blade_connection_transport_get(blade_connection_t *bc);
|
||||
KS_DECLARE(void) blade_connection_transport_set(blade_connection_t *bc, void *transport_data);
|
||||
KS_DECLARE(void) blade_connection_transport_set(blade_connection_t *bc, void *transport_data, blade_transport_callbacks_t *transport_callbacks);
|
||||
KS_DECLARE(void) blade_connection_state_set(blade_connection_t *bc, blade_connection_state_t state);
|
||||
KS_DECLARE(blade_connection_state_t) blade_connection_state_get(blade_connection_t *bc);
|
||||
KS_DECLARE(void) blade_connection_disconnect(blade_connection_t *bc);
|
||||
|
||||
@@ -47,9 +47,9 @@ KS_DECLARE(ks_status_t) blade_response_destroy(blade_response_t **bresP);
|
||||
KS_DECLARE(ks_status_t) blade_event_create(blade_event_t **bevP, blade_handle_t *bh, const char *session_id, cJSON *json);
|
||||
KS_DECLARE(ks_status_t) blade_event_destroy(blade_event_t **bevP);
|
||||
KS_DECLARE(ks_status_t) blade_rpc_request_create(ks_pool_t *pool, cJSON **json, cJSON **params, const char **id, const char *method);
|
||||
KS_DECLARE(ks_status_t) blade_rpc_response_create(ks_pool_t *pool, cJSON **json, cJSON **result, const char *id);
|
||||
KS_DECLARE(ks_status_t) blade_rpc_error_create(ks_pool_t *pool, cJSON **json, cJSON **error, const char *id, int32_t code, const char *message);
|
||||
KS_DECLARE(ks_status_t) blade_rpc_event_create(ks_pool_t *pool, cJSON **json, cJSON **result, const char *event);
|
||||
KS_DECLARE(ks_status_t) blade_rpc_response_create(cJSON **json, cJSON **result, const char *id);
|
||||
KS_DECLARE(ks_status_t) blade_rpc_error_create(cJSON **json, cJSON **error, const char *id, int32_t code, const char *message);
|
||||
KS_DECLARE(ks_status_t) blade_rpc_event_create(cJSON **json, cJSON **result, const char *event);
|
||||
KS_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user