httpd.h

来自「web服务器单片机开发」· C头文件 代码 · 共 30 行

H
30
字号
#ifndef __HTTPD_H__
#define __HTTPD_H__

void httpd_init(void);
void httpd_appcall(void);

/* UIP_APPCALL: the name of the application function. This function
   must return void and take no arguments (i.e., C type "void
   appfunc(void)"). */
#ifndef UIP_APPCALL
#define UIP_APPCALL     httpd_appcall
#endif

__packed struct httpd_state {//__packed关键字,否则由于datalen无法正确赋值而不能正常工作
  int state;
  int datalen;
  char *dataptr;
  
};


/* UIP_APPSTATE_SIZE: The size of the application-specific state
   stored in the uip_conn structure. */
#ifndef UIP_APPSTATE_SIZE
#define UIP_APPSTATE_SIZE (sizeof(struct httpd_state))
#endif

extern struct httpd_state *hs;

#endif /* __HTTPD_H__ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?