自实现内存池:按大小分桶,8bit跨度,支持释放。
resp协议pipline测试。
This commit is contained in:
@@ -103,7 +103,7 @@ int event_register(int fd, int event) {
|
||||
memset(conn_list[fd].rbuffer, 0, BUFFER_LENGTH);
|
||||
conn_list[fd].rlength = 0;
|
||||
|
||||
memset(conn_list[fd].wbuffer, 0, BUFFER_LENGTH);
|
||||
memset(conn_list[fd].wbuffer, 0, BUFFER_LENGTH*2);
|
||||
conn_list[fd].wlength = 0;
|
||||
|
||||
conn_list[fd].is_from_master = 0;
|
||||
@@ -407,6 +407,7 @@ int reactor_start(unsigned short port, msg_handler handler, char *m_ip, int m_po
|
||||
|
||||
#else
|
||||
if (events[i].events & EPOLLIN) {
|
||||
// printf("connlist:%p, r_action:%p, recv_callaback:%p\n", &conn_list[connfd], &conn_list[connfd].r_action, conn_list[connfd].r_action.recv_callback);
|
||||
conn_list[connfd].r_action.recv_callback(connfd);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user