diff options
Diffstat (limited to 'runtime/nsdpoll_ptcp.h')
-rw-r--r-- | runtime/nsdpoll_ptcp.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/nsdpoll_ptcp.h b/runtime/nsdpoll_ptcp.h index 36d39da7..ccdb87f0 100644 --- a/runtime/nsdpoll_ptcp.h +++ b/runtime/nsdpoll_ptcp.h @@ -26,10 +26,24 @@ #include "nsd.h" typedef nsdpoll_if_t nsdpoll_ptcp_if_t; /* we just *implement* this interface */ +/* a helper object to keep track of the epoll event records + * Note that we need to keep track of that list because we need to + * free the events when they are no longer needed. + */ +typedef struct nsdpoll_epollevt_lst_s nsdpoll_epollevt_lst_t; +struct nsdpoll_epollevt_lst_s { + epoll_event_t event; + int id; + void *pUsr; + nsd_ptcp_t *pSock; /* our associated netstream driver data */ + nsdpoll_epollevt_lst_t *pNext; +}; /* the nsdpoll_ptcp object */ struct nsdpoll_ptcp_s { BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */ + int efd; /* file descriptor used by epoll */ + nsdpoll_epollevt_lst_t *pRoot; /* Root of the epoll event list */ }; /* interface is defined in nsd.h, we just implement it! */ |