Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
teo_ws.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include "embedded/jsmn/jsmn.h"
#include "utils/rlutil.h"
#include "../teo_auth/teo_auth.h"
#include "teo_ws.h"

Macros

#define MODULE   _ANSI_YELLOW "websocket_l0" _ANSI_NONE
 File: teo_ws.c Author: Kirill Scherba kiril.nosp@m.l@sc.nosp@m.herba.nosp@m..ru More...
 
#define nc   ((struct mg_connection *)nc_p)
 Pointer to mg_connection structure. More...
 
#define kev   ((ksnetEvMgrClass*)kws->kh->ke)
 Pointer to teonet_cfg structure. More...
 
#define teoLNullDisconnectThis(con)   { free(con->user_data); teoLNullDisconnect(con); }
 
#define kev_t   ((ksnetEvMgrClass*)((teoLNullConnectUserData*)con->user_data)->kws->kh->ke)
 

Typedefs

typedef struct
teoLNullConnectUserData 
teoLNullConnectUserData
 L0 server teonet L0 connect user data. More...
 

Functions

teoWSClassteoWSInit (ksnHTTPClass *kh)
 This module label. More...
 

Macro Definition Documentation

#define kev   ((ksnetEvMgrClass*)kws->kh->ke)

Pointer to teonet_cfg structure.

#define kev_t   ((ksnetEvMgrClass*)((teoLNullConnectUserData*)con->user_data)->kws->kh->ke)
#define MODULE   _ANSI_YELLOW "websocket_l0" _ANSI_NONE

File: teo_ws.c Author: Kirill Scherba kiril.nosp@m.l@sc.nosp@m.herba.nosp@m..ru

Teonet websocket L0 connector module

Created on November 8, 2015, 3:58 PM

Referenced by teoWSInit().

#define teoLNullDisconnectThis (   con)    { free(con->user_data); teoLNullDisconnect(con); }

Typedef Documentation

typedef struct teoLNullConnectUserData teoLNullConnectUserData

L0 server teonet L0 connect user data.

Function Documentation

teoWSClass* teoWSInit ( ksnHTTPClass kh)

This module label.

Initialize teonet websocket module

Parameters
khPointer to ksnHTTPClass
Returns

References DEBUG, ksnHTTPClass::ke, ksn_puts, malloc(), and MODULE.

Referenced by ksnHTTPInit().