This file is used to define functions related to epoll that would be used mainly in network.c.
More...
Go to the source code of this file.
|
int | SNF_NFDS |
| Describes the amount of file descriptors to be handled.
|
|
int | SNF_EPOLLFD |
| Defines Epoll's file descriptor.
|
|
This file is used to define functions related to epoll that would be used mainly in network.c.
- Warning
- Do not use any functions inside this file outside of network.c, unless you know what you're doing.
◆ snf_epoll_init()
◆ snf_epoll_add()
int snf_epoll_add |
( |
int | FD | ) |
|
|
extern |
Add's a file descriptor to be handled by epoll.
- Parameters
-
FD | The File descriptor to be added |
- Returns
- The result :
◆ snf_epoll_del()
void snf_epoll_del |
( |
int | fd | ) |
|
|
extern |
removes a file descriptor from being handled by epoll
- Parameters
-
fd | The File descriptor to be removed |
◆ snf_epoll_getList()
int snf_epoll_getList |
( |
| ) |
|
|
extern |
Fetches the awaiting Epoll Events
- Returns
- The result of the wait
- Note
- - This function will block depending on epoll_wait (set with a timeout of 10 ms)
-
- the awaiting Epoll Events will be put in SNF_EPOLL_EVENTS
◆ SNF_NFDS
Describes the amount of file descriptors to be handled.
◆ SNF_EPOLLFD
Defines Epoll's file descriptor.