goahead 单步跟踪分析

goahead 单步跟踪分析

1.

static char websHost[ME_MAX_IP]; /* Host name for the server */

static char websIpAddr[ME_MAX_IP]; /* IP address for the server */

http.c 静态static 限制局部变量当前文件有效....

2.mbedtls_ssl_config

物联网的嵌入式设备适合小巧灵活的MbedTLS

安全传输层协议(TLS)用于在两个通信应用程序之间提供保密性和数据完整性。该协议由两层组成: TLS 记录协议(TLS Record)和 TLS 握手协议(TLS Handshake)。

3.walloc内存分配(malloc)

typedef void (*WebsMemNotifier)(ssize size);
static WebsMemNotifier memNotifier;

PUBLIC void *walloc(ssize num)
{
void *mem;

if ((mem = malloc(num)) == 0) {
if (memNotifier) {
(memNotifier)(num);
}
}
return mem;
}


PUBLIC void wfree(void *mem)
{
if (mem) {
free(mem);
}
}

4.webbuf、websocket

typedef struct WebsSocket {
WebsBuf lineBuf; /**< Line ring queue */
SocketAccept accept; /**< Accept handler */
SocketHandler handler; /**< User I/O handler */
char *ip; /**< Server listen address or remote client address */
void *handler_data; /**< User handler data */
int handlerMask; /**< Handler events of interest */
int sid; /**< Index into socket[] */
int port; /**< Port to listen on */
int flags; /**< Current state flags */
Socket sock; /**< Actual socket handle */
int fileHandle; /**< ID of the file handler */
int interestEvents; /**< Mask of events to watch for */
int currentEvents; /**< Mask of ready events (FD_xx) */
int selectEvents; /**< Events being selected */
int saveMask; /**< saved Mask for socketFlush */
int error; /**< Last error */
int secure; /**< Socket is using SSL */
int handshakes; /**< Number of renegotiations */
} WebsSocket;

posted on   lydstory  阅读(57)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2021-09-25 软件的结构
2021-09-25 C++ 委托机制实现
2020-09-25 大数运算库rsaref ,可用它来实现rsa 算法
2020-09-25 单片机 usb驱动
2020-09-25 lcd_clrline
2020-09-25 txt制作字库
2020-09-25 CJK

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示