summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/mongoose/examples/send_file
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-11-04 18:55:36 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-11-04 18:55:36 +0100
commitb6707c3bb53c931e9ec3c5c6630149b7121bbcf5 (patch)
tree2d9c880bb21242c3fb4619977fe9a71658b3d06e /3rdparty/mongoose/examples/send_file
parent2a067f08a4582cdff841dc27b661a9e48fac419a (diff)
Removed mongoose due to restricted license and webserver wip till code is restructured (nw)
Diffstat (limited to '3rdparty/mongoose/examples/send_file')
-rw-r--r--3rdparty/mongoose/examples/send_file/Makefile21
-rw-r--r--3rdparty/mongoose/examples/send_file/send_file.c27
2 files changed, 0 insertions, 48 deletions
diff --git a/3rdparty/mongoose/examples/send_file/Makefile b/3rdparty/mongoose/examples/send_file/Makefile
deleted file mode 100644
index 4c20d6ac4b6..00000000000
--- a/3rdparty/mongoose/examples/send_file/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright (c) 2014 Cesanta Software
-# All rights reserved
-
-PROG = send_file
-CFLAGS = -W -Wall -I../.. -pthread -g -O0 $(CFLAGS_EXTRA)
-SOURCES = $(PROG).c ../../mongoose.c
-
-all: $(PROG)
-
-run: $(PROG)
- ./$(PROG)
-
-$(PROG): $(SOURCES) Makefile
- $(CC) -o $(PROG) $(SOURCES) $(CFLAGS)
-
-win:
- wine cl $(SOURCES) /MD /nologo /DNDEBUG /O1 /I../.. /Fe$(PROG).exe
- wine $(PROG).exe
-
-clean:
- rm -rf $(PROG) *.exe *.dSYM *.obj *.exp .*o *.lib *.gc*
diff --git a/3rdparty/mongoose/examples/send_file/send_file.c b/3rdparty/mongoose/examples/send_file/send_file.c
deleted file mode 100644
index 345c3af694b..00000000000
--- a/3rdparty/mongoose/examples/send_file/send_file.c
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2014 Cesanta Software
-// All rights reserved
-//
-// This example demostrates how to send arbitrary files to the client.
-
-#include "mongoose.h"
-
-static int ev_handler(struct mg_connection *conn, enum mg_event ev) {
- switch (ev) {
- case MG_REQUEST:
- mg_send_file(conn, "send_file.c", NULL); // Also could be a dir, or CGI
- return MG_MORE; // It is important to return MG_MORE after mg_send_file!
- case MG_AUTH: return MG_TRUE;
- default: return MG_FALSE;
- }
-}
-
-int main(void) {
- struct mg_server *server = mg_create_server(NULL, ev_handler);
- mg_set_option(server, "listening_port", "8080");
-
- printf("Starting on port %s\n", mg_get_option(server, "listening_port"));
- for (;;) mg_poll_server(server, 1000);
- mg_destroy_server(&server);
-
- return 0;
-}