mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-20 19:41:58 +00:00
Merge pull request #509 from cesanta/Fix_mjpg_streamer_example
Fix mjpg_streamer example
This commit is contained in:
commit
5c7aeac148
2 files changed
+7
-1
No files matched your search
@@ -5362,6 +5362,11 @@ static void mg_ev_handler(struct ns_connection *nc, int ev, void *p) {
|
|||||||
write_terminating_chunk(conn);
|
write_terminating_chunk(conn);
|
||||||
}
|
}
|
||||||
close_local_endpoint(conn);
|
close_local_endpoint(conn);
|
||||||
|
/*
|
||||||
|
* MG_POLL callback returned MG_TRUE,
|
||||||
|
* i.e. data is sent, set corresponding flag
|
||||||
|
*/
|
||||||
|
conn->ns_conn->flags |= NSF_FINISHED_SENDING_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn->endpoint_type == EP_FILE) {
|
if (conn->endpoint_type == EP_FILE) {
|
||||||
|
|||||||
+2
-1
@@ -60,7 +60,8 @@ 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, MG_MORE };
|
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, // If callback returns MG_TRUE connection closes
|
||||||
|
// after all of data is sent
|
||||||
MG_CONNECT, // If callback returns MG_FALSE, connect fails
|
MG_CONNECT, // If callback returns MG_FALSE, connect fails
|
||||||
MG_AUTH, // If callback returns MG_FALSE, authentication fails
|
MG_AUTH, // If callback returns MG_FALSE, authentication fails
|
||||||
MG_REQUEST, // If callback returns MG_FALSE, Mongoose continues with req
|
MG_REQUEST, // If callback returns MG_FALSE, Mongoose continues with req
|
||||||
|
|||||||
Reference in new issue
Block a user