goahead处理json_Ajax-goahead局部刷新页面

本文档展示了Goahead如何处理AJAX请求,通过内置的CGI处理方式来实现高效的局部页面刷新。代码中定义了websAjaxHandler函数,用于查找并执行相应的AJAX处理函数,并使用websAjaxHeader发送HTTP响应头。此外,还提供了websAjaxDefine用于注册新的AJAX处理函数,以及 websAjaxOpen 和 websAjaxClose 用于管理AJAX符号表。
摘要由CSDN通过智能技术生成

1

2 /********************************** Description *******************************/

3

4 /*

5 * This module implements the /ajax handler. It emulates CGI processing6 * but performs this in-process and not as an external process. This enables7 * a very high performance implementation with easy parsing and decoding8 * of query strings and posted data.9 */

10

11 /*********************************** Includes *********************************/

12

13 #include "wsIntrn.h"

14

15 /************************************ Locals **********************************/

16

17 static sym_fd_t ajaxSymtab = -1; /*Symbol table for ajax handlers*/

18

19

20 /************************************* Code ***********************************/

21 static intwebsAjaxHandlerDone(webs_t wp);22 static voidwebsAjaxHeader(webs_t wp);23 /

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值