Commit dcbd1cbb authored by Sergey Lyubka's avatar Sergey Lyubka

Moved pubsub example to websocket_chat

parent a3b568f4
# 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
...@@ -46,7 +46,7 @@ static int ev_handler(struct mg_connection *conn, enum mg_event ev) { ...@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment