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
b77532ea
Commit
b77532ea
authored
Mar 04, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added mjpg example
parent
ed8168e8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
Makefile
examples/Makefile
+5
-1
mongoose.c
mongoose.c
+4
-0
mongoose.h
mongoose.h
+1
-1
No files found.
examples/Makefile
View file @
b77532ea
...
@@ -48,6 +48,10 @@ upload: upload.c ../mongoose.c
...
@@ -48,6 +48,10 @@ upload: upload.c ../mongoose.c
auth
:
auth.c ../mongoose.c
auth
:
auth.c ../mongoose.c
$(CC)
auth.c ../mongoose.c
$(OUT)
$(CFLAGS)
$(CC)
auth.c ../mongoose.c
$(OUT)
$(CFLAGS)
mjpg
:
mjpg.c ../mongoose.c
$(CC)
mjpg.c ../mongoose.c
$(OUT)
$(CFLAGS)
websocket_html.c
:
websocket.html
websocket_html.c
:
websocket.html
perl mkdata.pl
$<
>
$@
perl mkdata.pl
$<
>
$@
...
@@ -55,4 +59,4 @@ u:
...
@@ -55,4 +59,4 @@ u:
g++ unit_test.c
-Wall
-W
-pedantic
-lssl
-g
-O0
$(CFLAGS_EXTRA)
&&
./a.out
g++ unit_test.c
-Wall
-W
-pedantic
-lssl
-g
-O0
$(CFLAGS_EXTRA)
&&
./a.out
clean
:
clean
:
-
@
$(RM)
hello upload post websocket auth server multi_threaded websocket_html.c
*
.exe
*
.dSYM
*
.obj .
*
o
-
@
$(RM)
hello
mjpg
upload post websocket auth server multi_threaded websocket_html.c
*
.exe
*
.dSYM
*
.obj .
*
o
mongoose.c
View file @
b77532ea
...
@@ -4783,6 +4783,10 @@ static void mg_ev_handler(struct ns_connection *nc, enum ns_event ev, void *p) {
...
@@ -4783,6 +4783,10 @@ static void mg_ev_handler(struct ns_connection *nc, enum ns_event ev, void *p) {
break
;
break
;
case
NS_POLL
:
case
NS_POLL
:
if
(
call_user
(
conn
,
MG_POLL
)
==
MG_TRUE
)
{
nc
->
flags
|=
NSF_FINISHED_SENDING_DATA
;
}
if
(
conn
!=
NULL
&&
conn
->
endpoint_type
==
EP_FILE
)
{
if
(
conn
!=
NULL
&&
conn
->
endpoint_type
==
EP_FILE
)
{
transfer_file_data
(
conn
);
transfer_file_data
(
conn
);
}
}
...
...
mongoose.h
View file @
b77532ea
...
@@ -58,7 +58,7 @@ struct mg_connection {
...
@@ -58,7 +58,7 @@ struct mg_connection {
};
};
struct
mg_server
;
// Opaque structure describing server instance
struct
mg_server
;
// Opaque structure describing server instance
enum
mg_result
{
MG_FALSE
,
MG_TRUE
};
enum
mg_result
{
MG_FALSE
,
MG_TRUE
,
MG_MORE
};
enum
mg_event
{
enum
mg_event
{
MG_POLL
=
100
,
// Callback return value is ignored
MG_POLL
=
100
,
// Callback return value is ignored
MG_CONNECT
,
// If callback returns MG_FALSE, connect fails
MG_CONNECT
,
// If callback returns MG_FALSE, connect fails
...
...
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