mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2026-07-07 11:55:38 +00:00
first commit
This commit is contained in:
commit
fa343db334
154 changed files with 18186 additions and 0 deletions
49
project/inc/web/web_srv_int.h
Normal file
49
project/inc/web/web_srv_int.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* File: web_srv_int.h
|
||||
* Description: The web server configration.
|
||||
* Small WEB server ESP8266EX
|
||||
*
|
||||
* Author: PV` 12/2014
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_WEB_SRV_INT_H_
|
||||
#define _INCLUDE_WEB_SRV_INT_H_
|
||||
|
||||
#include "web_srv.h"
|
||||
|
||||
#define WEB_NAME_VERSION "PVs/0.2"
|
||||
|
||||
// #define WEBSOCKET_ENA 1
|
||||
|
||||
// lifetime (sec) of static responses as string 60*60*24*14=1209600"
|
||||
#define FILE_CACHE_MAX_AGE_SEC 3600 // время для кеша файлов, ставить 0 пока тест!
|
||||
|
||||
#define MAX_HTTP_HEAD_BUF 3070 // максимальный размер HTTP запроса (GET)
|
||||
|
||||
#define RESCHKS_SEND_SIZE 16
|
||||
#define RESCHKE_SEND_SIZE 8
|
||||
#define RESCHK_SEND_SIZE (RESCHKS_SEND_SIZE + RESCHKE_SEND_SIZE)
|
||||
|
||||
#define MIN_SEND_SIZE (256 + RESCHK_SEND_SIZE) // минимальный размер буфера для передачи файла
|
||||
#define MAX_SEND_SIZE ((TCP_MSS*4) + RESCHK_SEND_SIZE) // максимальный размер буфера для передачи 4*MSS = 5840 (MSS=1460)
|
||||
|
||||
#define HTTP_SEND_SIZE 384 // минимальный размер буфера для передачи заголовка HTTP
|
||||
#define SCB_SEND_SIZE 128 // минимальный резерв в буфере для callback
|
||||
|
||||
#define webfile bffiles[0] // File pointer for main file
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void web_int_vars(TCP_SERV_CONN *ts_conn, uint8 *pcmd, uint8 *pvar);
|
||||
void web_int_cookie(HTTP_CONN *CurHTTP, TCP_SERV_CONN *ts_conn);
|
||||
void web_int_callback(TCP_SERV_CONN *ts_conn, uint8 *cstr);
|
||||
|
||||
void web_hexdump(TCP_SERV_CONN *ts_conn);
|
||||
bool web_inc_fopen(TCP_SERV_CONN *ts_conn, uint8 *cFile);
|
||||
bool web_inc_fclose(WEB_SRV_CONN *web_conn);
|
||||
|
||||
bool web_trim_bufi(TCP_SERV_CONN *ts_conn, uint8 *pdata, uint32 data_len);
|
||||
bool web_feee_bufi(TCP_SERV_CONN *ts_conn);
|
||||
//uint8 * head_find_ctr(HTTP_CONN *CurHTTP, const uint8 * c, int clen, int dlen);
|
||||
|
||||
#endif /* _INCLUDE_WEB_SRV_INT_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue