Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
05d7b7c8
Commit
05d7b7c8
authored
Apr 09, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MG_WS_HANDSHAKE
parent
d8b4db37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
mongoose.c
mongoose.c
+3
-1
mongoose.h
mongoose.h
+1
-1
No files found.
mongoose.c
View file @
05d7b7c8
...
...
@@ -2631,7 +2631,9 @@ static void send_websocket_handshake_if_requested(struct mg_connection *conn) {
*
key
=
mg_get_header
(
conn
,
"Sec-WebSocket-Key"
);
if
(
ver
!=
NULL
&&
key
!=
NULL
)
{
conn
->
is_websocket
=
1
;
send_websocket_handshake
(
conn
,
key
);
if
(
call_user
(
MG_CONN_2_CONN
(
conn
),
MG_WS_HANDSHAKE
)
==
MG_FALSE
)
{
send_websocket_handshake
(
conn
,
key
);
}
}
}
...
...
mongoose.h
View file @
05d7b7c8
...
...
@@ -67,7 +67,7 @@ enum mg_event {
MG_REQUEST
,
// If callback returns MG_FALSE, Mongoose continues with req
MG_REPLY
,
// If callback returns MG_FALSE, Mongoose closes connection
MG_CLOSE
,
// Connection is closed, callback return value is ignored
MG_
LUA
,
// Called before LSP page invoked
MG_
WS_HANDSHAKE
,
// New websocket connection, handshake request
MG_HTTP_ERROR
// If callback returns MG_FALSE, Mongoose continues with err
};
typedef
int
(
*
mg_handler_t
)(
struct
mg_connection
*
,
enum
mg_event
);
...
...
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