Teonet library
0.4.7
|
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include "modules/teo_web/teo_web.h"
#include "modules/teo_web/teo_web_conf.h"
#include "modules/teo_auth/teo_auth.h"
Macros | |
#define | TWEB_VERSION "0.0.1" |
File: teoweb.c Author: Kirill Scherba kiril l@sc herba .ruMore... | |
#define | APP_NAME "teoweb" |
#define | HELLO_MSG "Hello from WS server!" |
Typedefs | |
typedef struct teowebModules | teowebModules |
Functions | |
void | event_cb (ksnetEvMgrClass *ke, ksnetEvMgrEvents event, void *data, size_t data_len, void *user_data) |
Teonet event handler. More... | |
int | main (int argc, char **argv) |
Main application function. More... | |
#define APP_NAME "teoweb" |
Referenced by event_cb().
#define HELLO_MSG "Hello from WS server!" |
Referenced by event_cb().
#define TWEB_VERSION "0.0.1" |
File: teoweb.c Author: Kirill Scherba kiril l@sc herba .ru
Teonet HTTP/WS server based on Cesanta mongoose: https://github.com/cesanta/mongoose
Created on October 1, 2015, 1:17 PM
Referenced by main().
typedef struct teowebModules teowebModules |
void event_cb | ( | ksnetEvMgrClass * | ke, |
ksnetEvMgrEvents | event, | ||
void * | data, | ||
size_t | data_len, | ||
void * | user_data | ||
) |
Teonet event handler.
ke | |
event | |
data | |
data_len | |
user_data |
References APP_NAME, teoweb_data::cmd, data, teoweb_data::data, teoweb_data::data_len, DEBUG, EV_K_ASYNC, EV_K_STARTED, EV_K_STOPPED_BEFORE, HELLO_MSG, ksn_printf, ksnHTTPDestroy(), ksnHTTPInit(), mg_send_websocket_frame(), nc, ksnetEvMgrClass::user_data, mg_connection::user_data, WEBSOCKET_OP_TEXT, WS_CONNECTED, WS_DISCONNECTED, and WS_MESSAGE.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Main application function.
argc | |
argv |
References event_cb(), ke, ksnetEvMgrInitPort(), ksnetEvMgrRun(), teonet_cfg::network, teonet_cfg::port, READ_ALL, ksnetEvMgrClass::teo_cfg, teoGetLibteonetVersion(), teoSetAppType(), teoSetAppVersion(), teowebConfigFree(), teowebConfigInit(), teowebConfigRead(), and TWEB_VERSION.