📄 webport.h
字号:
/* webport.h Per-port TCP/IP, sockets, system info includes. */
#ifndef _WEBPORT_H_
#define _WEBPORT_H_ 1
#ifndef HTML_COMP
#include "libport.h" /* NetPort embedded system includes */
#include "tcpapp.h"
#ifdef SMTP_ALERTS
#include "smtpport.h"
#include "smtpalrt.h"
#endif /* SMTP_ALERTS */
/* forward declarations to stifle compiler warnings */
struct httpd;
struct httpform;
struct vfs_file;
struct map_item;
#else /* the html compiler's case */
struct httpd;
struct vfs_file;
#include "nptypes.h"
#endif
/* Define HT_CONST to the "const" keyword used by the compiler.
Data generated by HTML compiler uses HT_CONST. If "const" declaration
is not desired, then HT_CONST can be changed to reflect that. */
#define HT_CONST const
#define HTTPMAXSEND 4096 /* MAX we should send to sock in one loop */
#define HTTPTMO (12*TPS) /* ticks to time out idle connection */
#define HTTICKS (cticks) /* LONG - ticks since start */
/* Define this if there is a local disk system to default to when the
named files are not found in the virtual file system */
#ifdef OMIT_VFS
#define HT_NOVFS 1 /* TRUE if there's no virtual files */
#endif
#define HT_USERAUTH 1 /* TRUE to include user authorization code */
#define HT_MD5AUTH 1 /* TRUE to include MD5 code */
#define HTML_COMPRESSION 1 /* TRUE to include HTML tags compression logic */
#define FOREIGN_LANG_SUPPORT 1 /* TRUE to compress around high bit chars */
#define NP_ESCAPE_CHAR 0xff
#define __ARGS(x) x /* for RSA md5.h security include */
/* HTTP_ENTRY macro applied to all http code entry points: */
#define _HTTP_ENTRY _loadds
extern WP_SOCKTYPE httpsock; /* socket listening for http connections */
extern struct sockaddr_in httpsin;
int http_init(void); /* start up the web server */
void http_check(void); /* demo http server task loop */
/* define these away to nothing for now... */
#define ht_putfile(hp)
#define ht_putmore(hp)
#define ht_setfiletype(hp) (FTYPE_NULL) /* default file type */
#define SYS_EWOULDBLOCK EWOULDBLOCK
#ifdef HT_MD5AUTH
extern char * make_nonce(struct httpd * hp, struct vfs_file * vfp);
#endif
#define HTTPVER_1_1 1 /* http version number 1.1 */
#define HTTP_PORT 80 /* non-secure http port number */
#define SSL_PORT 443 /* secure http port number */
#endif /* _WEBPORT_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -