Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-stream
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-stream
Commits
c17f6172
Commit
c17f6172
authored
6 years ago
by
Dmitriy A. Gerasimov
Committed by
Kurotych Anatolii
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[*] 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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
stream/CMakeLists.txt
+0
-1
0 additions, 1 deletion
stream/CMakeLists.txt
stream/dap_stream.c
+10
-9
10 additions, 9 deletions
stream/dap_stream.c
stream/dap_stream.h
+4
-1
4 additions, 1 deletion
stream/dap_stream.h
with
14 additions
and
11 deletions
stream/CMakeLists.txt
+
0
−
1
View file @
c17f6172
...
@@ -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 .
)
This diff is collapsed.
Click to expand it.
stream/dap_stream.c
+
10
−
9
View file @
c17f6172
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
stream/dap_stream.h
+
4
−
1
View file @
c17f6172
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment