自定义短连加解包

和长连一样,短连的加包也是在 Req2Buf 之后进行的,也即短连的 body 是 Req2Buf 得到的数据,短连的头部是加包上去的。即使修改短连的加包逻辑也请只在 HTTP 协议基础上增减字段,建议不要改为其他协议,因为本身短连就是为了弥补长连私有协议的请求可能被中间设备丢掉而做的。

  1. void (*shortlink_pack)(const std::string& _url, const std::map<std::string, std::string>& _headers, const AutoBuffer& _body, const AutoBuffer& _extension, AutoBuffer& _out_buff, shortlink_tracker* _tracker);