Skip to content
Snippets Groups Projects
Commit c17f6172 authored by Dmitriy A. Gerasimov's avatar Dmitriy A. Gerasimov Committed by Kurotych Anatolii
Browse files

[*] Returned back dap_stream_new_es() function (#8)

* Returned back dap_stream_new_es() function
parent 9b68cf5b
No related branches found
No related tags found
No related merge requests found
...@@ -12,4 +12,3 @@ target_link_libraries(dap_stream dap_core dap_udp_server dap_crypto ...@@ -12,4 +12,3 @@ target_link_libraries(dap_stream dap_core dap_udp_server dap_crypto
dap_http_server dap_enc_server dap_session dap_stream_ch) dap_http_server dap_enc_server dap_session dap_stream_ch)
target_include_directories(dap_stream INTERFACE .) target_include_directories(dap_stream INTERFACE .)
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "dap_stream_ch_proc.h" #include "dap_stream_ch_proc.h"
#include "dap_stream_ch_pkt.h" #include "dap_stream_ch_pkt.h"
#include "dap_stream_session.h" #include "dap_stream_session.h"
#include "dap_events_socket.h"
#include "dap_client_remote.h" #include "dap_client_remote.h"
#include "dap_http.h" #include "dap_http.h"
...@@ -281,17 +282,17 @@ dap_stream_t * stream_new(dap_http_client_t * sh) ...@@ -281,17 +282,17 @@ dap_stream_t * stream_new(dap_http_client_t * sh)
* @param a_es * @param a_es
* @return * @return
*/ */
//dap_stream_t* dap_stream_new_es(dap_events_socket_t * a_es) dap_stream_t* dap_stream_new_es(dap_events_socket_t * a_es)
//{ {
// dap_stream_t * ret= DAP_NEW_Z(dap_stream_t); dap_stream_t * ret= DAP_NEW_Z(dap_stream_t);
// ret->events_socket = a_es; ret->events_socket = a_es;
// ret->buf_defrag_size=0; ret->buf_defrag_size=0;
// ret->is_client_to_uplink = true; ret->is_client_to_uplink = true;
// log_it(L_NOTICE,"New stream with events socket instance for %s",a_es->hostaddr); log_it(L_NOTICE,"New stream with events socket instance for %s",a_es->hostaddr);
// return ret; return ret;
//} }
/** /**
* @brief s_headers_write Prepare headers for output. Creates stream structure * @brief s_headers_write Prepare headers for output. Creates stream structure
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "dap_stream_session.h" #include "dap_stream_session.h"
#include "dap_stream_ch.h" #include "dap_stream_ch.h"
#include "dap_events_socket.h"
#include "dap_udp_server.h" #include "dap_udp_server.h"
#include "dap_udp_client.h" #include "dap_udp_client.h"
...@@ -42,6 +43,7 @@ typedef struct dap_http_client dap_http_client_t; ...@@ -42,6 +43,7 @@ typedef struct dap_http_client dap_http_client_t;
typedef struct dap_http dap_http_t; typedef struct dap_http dap_http_t;
typedef struct dap_stream dap_stream_t; typedef struct dap_stream dap_stream_t;
typedef struct dap_stream_pkt dap_stream_pkt_t; typedef struct dap_stream_pkt dap_stream_pkt_t;
typedef struct dap_events_socket dap_events_socket_t;
#define STREAM_BUF_SIZE_MAX 500000 #define STREAM_BUF_SIZE_MAX 500000
#define STREAM_KEEPALIVE_TIMEOUT 3 // How often send keeplive messages (seconds) #define STREAM_KEEPALIVE_TIMEOUT 3 // How often send keeplive messages (seconds)
#define STREAM_KEEPALIVE_PASSES 3 // How many messagges without answers need for disconnect client and close session #define STREAM_KEEPALIVE_PASSES 3 // How many messagges without answers need for disconnect client and close session
...@@ -57,6 +59,7 @@ typedef struct dap_stream { ...@@ -57,6 +59,7 @@ typedef struct dap_stream {
struct dap_http_client * conn_http; // HTTP-specific struct dap_http_client * conn_http; // HTTP-specific
struct dap_udp_client * conn_udp; // UDP-client struct dap_udp_client * conn_udp; // UDP-client
dap_events_socket_t * events_socket;
bool is_live; bool is_live;
bool is_client_to_uplink ; bool is_client_to_uplink ;
...@@ -94,7 +97,7 @@ void dap_stream_add_proc_http(dap_http_t * sh, const char * url); ...@@ -94,7 +97,7 @@ void dap_stream_add_proc_http(dap_http_t * sh, const char * url);
void dap_stream_add_proc_udp(dap_udp_server_t * sh); void dap_stream_add_proc_udp(dap_udp_server_t * sh);
// dap_stream_t* dap_stream_new_es(dap_events_socket_t * a_es); dap_stream_t* dap_stream_new_es(dap_events_socket_t * a_es);
size_t dap_stream_data_proc_read(dap_stream_t * a_stream); size_t dap_stream_data_proc_read(dap_stream_t * a_stream);
size_t dap_stream_data_proc_write(dap_stream_t * a_stream); size_t dap_stream_data_proc_write(dap_stream_t * a_stream);
void dap_stream_delete(dap_stream_t * a_stream); void dap_stream_delete(dap_stream_t * a_stream);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment