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
64b51699
Commit
64b51699
authored
Jun 09, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MG_WS_CONNECT
parent
50a889da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
mongoose.c
mongoose.c
+1
-0
mongoose.h
mongoose.h
+1
-0
No files found.
mongoose.c
View file @
64b51699
...
@@ -2734,6 +2734,7 @@ static void send_websocket_handshake_if_requested(struct mg_connection *conn) {
...
@@ -2734,6 +2734,7 @@ static void send_websocket_handshake_if_requested(struct mg_connection *conn) {
if
(
call_user
(
MG_CONN_2_CONN
(
conn
),
MG_WS_HANDSHAKE
)
==
MG_FALSE
)
{
if
(
call_user
(
MG_CONN_2_CONN
(
conn
),
MG_WS_HANDSHAKE
)
==
MG_FALSE
)
{
send_websocket_handshake
(
conn
,
key
);
send_websocket_handshake
(
conn
,
key
);
}
}
call_user
(
MG_CONN_2_CONN
(
conn
),
MG_WS_CONNECT
);
}
}
}
}
...
...
mongoose.h
View file @
64b51699
...
@@ -68,6 +68,7 @@ enum mg_event {
...
@@ -68,6 +68,7 @@ enum mg_event {
MG_REPLY
,
// If callback returns MG_FALSE, Mongoose closes connection
MG_REPLY
,
// If callback returns MG_FALSE, Mongoose closes connection
MG_CLOSE
,
// Connection is closed, callback return value is ignored
MG_CLOSE
,
// Connection is closed, callback return value is ignored
MG_WS_HANDSHAKE
,
// New websocket connection, handshake request
MG_WS_HANDSHAKE
,
// New websocket connection, handshake request
MG_WS_CONNECT
,
// New websocket connection established
MG_HTTP_ERROR
// If callback returns MG_FALSE, Mongoose continues with err
MG_HTTP_ERROR
// If callback returns MG_FALSE, Mongoose continues with err
};
};
typedef
int
(
*
mg_handler_t
)(
struct
mg_connection
*
,
enum
mg_event
);
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