Moved pubsub example to websocket_chat

This commit is contained in:
Sergey Lyubka committed 2014-09-08 23:29:34 +01:00
1 parent a3b568f460
commit dcbd1cbbd1
3 files changed
+13 -1

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
# Copyright (c) 2014 Cesanta Software
# All rights reserved
PROG = websocket_chat
CFLAGS = -W -Wall -I../.. -g -O0 $(CFLAGS_EXTRA)
SOURCES = $(PROG).c ../../mongoose.c
$(PROG): $(SOURCES)
$(CC) -o $(PROG) $(SOURCES) $(CFLAGS)
clean:
rm -rf $(PROG) *.exe *.dSYM *.obj *.exp .*o *.lib
File renamed without changes.
@@ -46,7 +46,7 @@ static int ev_handler(struct mg_connection *conn, enum mg_event ev) {
handle_websocket_message(conn); handle_websocket_message(conn);
return MG_TRUE; return MG_TRUE;
} else { } else {
mg_send_file(conn, "pubsub.html"); // Return MG_MORE after mg_send_file() mg_send_file(conn, "index.html"); // Return MG_MORE after mg_send_file()
return MG_MORE; return MG_MORE;
} }
case MG_WS_CONNECT: case MG_WS_CONNECT: