Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nginx-push-stream-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
nginx-push-stream-module
Commits
8bdfda09
Commit
8bdfda09
authored
Apr 06, 2013
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send a ping frame as feedback when publishing a message through websocket connection
parent
5bf38799
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
websocket_spec.rb
misc/spec/subscriber/websocket_spec.rb
+7
-0
ngx_http_push_stream_module_websocket.c
src/ngx_http_push_stream_module_websocket.c
+2
-0
No files found.
misc/spec/subscriber/websocket_spec.rb
View file @
8bdfda09
...
...
@@ -308,6 +308,13 @@ describe "Subscriber WebSocket" do
headers
,
body
=
read_response_on_socket
(
socket
)
socket
.
print
(
frame
)
body
,
dummy
=
read_response_on_socket
(
socket
)
body
.
should
eql
(
"
\211\000
"
)
body
,
dummy
=
read_response_on_socket
(
socket
)
body
.
should
eql
(
"
\x81
N{
\"
channel
\"
:
\"
ch_test_publish_message_same_stream
\"
,
\"
id
\"
:
\"
1
\"
,
\"
message
\"
:
\"
hello
\"
}"
)
EventMachine
.
run
do
pub
=
EventMachine
::
HttpRequest
.
new
(
nginx_address
+
'/channels-stats?id='
+
channel
.
to_s
).
get
:timeout
=>
30
pub
.
callback
do
...
...
src/ngx_http_push_stream_module_websocket.c
View file @
8bdfda09
...
...
@@ -281,6 +281,8 @@ ngx_http_push_stream_websocket_reading(ngx_http_request_t *r)
ngx_http_finalize_request
(
r
,
NGX_OK
);
ngx_destroy_pool
(
temp_pool
);
return
;
}
else
{
ngx_http_push_stream_send_response_text
(
r
,
NGX_HTTP_PUSH_STREAM_WEBSOCKET_PING_LAST_FRAME_BYTE
,
sizeof
(
NGX_HTTP_PUSH_STREAM_WEBSOCKET_PING_LAST_FRAME_BYTE
),
1
);
}
}
...
...
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