Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
27e1bcab
Commit
27e1bcab
authored
Jan 28, 2012
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added spdylay_before_ctrl_send_callback
parent
7016fe1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
lib/includes/spdylay/spdylay.h
lib/includes/spdylay/spdylay.h
+10
-0
lib/spdylay_session.c
lib/spdylay_session.c
+6
-1
No files found.
lib/includes/spdylay/spdylay.h
View file @
27e1bcab
...
...
@@ -221,6 +221,15 @@ typedef void (*spdylay_on_data_send_callback)
(
spdylay_session
*
session
,
uint8_t
flags
,
int32_t
stream_id
,
int32_t
length
,
void
*
user_data
);
/*
* Callback function invoked before frame |frame| of type |type| is
* sent. This may be useful, for example, to know the stream ID of
* SYN_STREAM frame, which is not assigned when it was queued.
*/
typedef
void
(
*
spdylay_before_ctrl_send_callback
)
(
spdylay_session
*
session
,
spdylay_frame_type
type
,
spdylay_frame
*
frame
,
void
*
user_data
);
typedef
struct
{
spdylay_send_callback
send_callback
;
spdylay_recv_callback
recv_callback
;
...
...
@@ -229,6 +238,7 @@ typedef struct {
spdylay_on_ping_recv_callback
on_ping_recv_callback
;
spdylay_on_data_chunk_recv_callback
on_data_chunk_recv_callback
;
spdylay_on_data_recv_callback
on_data_recv_callback
;
spdylay_before_ctrl_send_callback
before_ctrl_send_callback
;
spdylay_on_ctrl_send_callback
on_ctrl_send_callback
;
spdylay_on_data_send_callback
on_data_send_callback
;
}
spdylay_session_callbacks
;
...
...
lib/spdylay_session.c
View file @
27e1bcab
...
...
@@ -519,7 +519,12 @@ int spdylay_session_send(spdylay_session *session)
session
->
aob
.
item
=
item
;
session
->
aob
.
framebuf
=
framebuf
;
session
->
aob
.
framebuflen
=
framebuflen
;
/* TODO Call before_send callback */
/* Call before_send callback */
if
(
item
->
frame_type
!=
SPDYLAY_DATA
&&
session
->
callbacks
.
before_ctrl_send_callback
)
{
session
->
callbacks
.
before_ctrl_send_callback
(
session
,
item
->
frame_type
,
item
->
frame
,
session
->
user_data
);
}
}
data
=
session
->
aob
.
framebuf
+
session
->
aob
.
framebufoff
;
datalen
=
session
->
aob
.
framebuflen
-
session
->
aob
.
framebufoff
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment