Changed websocket_data() handler API. Buffering and passing whole websocket message.

This commit is contained in:
Sergey Lyubka committed 2013-03-08 16:03:23 +00:00
1 parent 22dddc2eeb
commit 8d1f6377c4
3 files changed
+82 -51

No files matched your search

+3 -2
View File
@@ -62,7 +62,8 @@ struct mg_callbacks {
int (*init_ssl)(void *ssl_context, void *user_data);
int (*websocket_connect)(const struct mg_connection *);
void (*websocket_ready)(struct mg_connection *);
int (*websocket_data)(struct mg_connection *);
int (*websocket_data)(struct mg_connection *, int flags,
char *data, size_t data_len);
const char * (*open_file)(const struct mg_connection *,
const char *path, size_t *data_len);
void (*init_lua)(struct mg_connection *, void *lua_context);
@@ -90,7 +91,7 @@ struct mg_callbacks {
// };
// struct mg_context *ctx = mg_start(&my_func, NULL, options);
//
// Please refer to http://code.google.com/p/mongoose/wiki/MongooseManual
// Refer to https://github.com/valenok/mongoose/blob/master/UserManual.md
// for the list of valid option and their possible values.
//
// Return: