ePump v2.1.8 released
- The ePump threads need to be waken up instantly when a new device fd or a timer instance is initialized during suspending by select;
- UDP socket pair of client and server replaced eventfd as wakeup facility. Fixed the bug that udp socket not initialized during startup;
- For select model, the device fd should be removed from monitoring queue when new event is generated, and re-appended when callback of event completed. Fixed the bug not following the rule;
- Added functions of set/clear fd monitoring queue, such as iodev_set_poll, iodev_clear_poll;
- Replaced 'struct sockaddr' with ep_sockaddr_t in the case of accept, recvfrom, getpeername, getsockname. Solved the problem failing to get correct result of these call in Windows;
- ePump is a full-nonblocking framework, even in DNS name resolving process. Added the DNS name server to epump core object from local host configuration.
本版本修改或新增功能描述如下:
- 在epump线程处于select阻塞挂起状态时,如果添加一个设备或定时器到监控队列后,需要唤醒epump线程,以便能及时地监控新的设备列表和定时器;
- 当没有eventfd设施时,需要采用udp本地客户端和本地服务器端的通信来作为唤醒epump线程的机制,修改了唤醒机制没有初始化的bug;
- 对于采用select通信机制的系统,产生事件时,其对应的设备fd需从监控读写队列中摘除,在事件回调处理完后,需要将当前事件对应的设备fd重新添加到监控队列中,按照这个逻辑修正了bug;
- 在iodev.c中增加了iodev_set_poll和iodev_clear_poll函数,只负责将设备fd从监控队列中设置和清理,是epump内部使用的函数;
- eptcp_accept中接受客户端请求时,使用sockaddr结构在Windows下返回错误,接受不到客户端的连接请求,修改为ep_sockaddr_t结构,来接受客户端请求;另外,recvfrom,getpeername, getsockname等函数,sockaddr地址都修改为ep_sockaddr_t结构;
- epdns.c中在Windows下自动获取当前系统配置的DNS域名服务器地址,并添加到epdns的dns_host中,方便系统根据当前配置来采用非阻塞模式解析各种远程地址的域名;