Skip to content

eJet v1.2.6 released

Compare
Choose a tag to compare
@kehengzhong kehengzhong released this 22 Jun 15:08
· 25 commits to main since this release
127e91e
  1. If callback function of the HTTP request does not exist or return the value less than 0, the file corresponding to request location will be replied to client. If the file doest not exists, 404 is replied;
  2. Dynamical page is generated and replied to client by page template technology. Optimized the interfaces of appending data to response by http page template handling;
  3. The transmission progress of HTTP message body is tracked by callback mechanism when receiving response or sending HTTP Post request. Optimized the interface parameters of callback function;
  4. For the asynchronous event-driven framework, the worker thread sending HTTP request by do_http_get or do_http_post function is different from the worker receiving its response. This will possibly cause some unpredictable exceptions. Fixed the bug;
  5. The responsed body to client is possibly constructed from issuing one more asynchronous requests (TCP orHTTP). Original Reply function does not support the sending of asynchronously arriving data. Added the new function AsynReply, and reserved the functioin ReplyFeeding for compatibility. Added the ReplyFeedingEnd function.

本版本修订的内容如下:

  1. 在处理HTTP请求时,各级回调函数如果没有处理该请求,并且回调函数返回值小于0时,就返回该请求对应的资源位置的文件,如果没有对应的文件,则返回404;
  2. 采用页面模板方式来生成动态网页返回给客户端,优化了页面模板添加到响应体的接口函数;
  3. 当接收响应或者发送Post请求时,消息体的传输进度通过回调机制进行跟踪,优化了回调函数接口;
  4. 由于采用异步事件驱动机制,使用do_http_get或do_http_post发送HTTP请求的工作线程,和接收响应的线程不一定相同,可能会导致不可预知的异常,优化了这个Bug;
  5. 返回给客户端的响应数据,可能需要二次或多次异步请求才能获取到,原来的Reply接口不支持异步数据发送回给客户端,增加了AsynReply接口,并为了兼容性,保留了ReplyFeeding接口,增加了ReplyFeedingEnd接口。