kqueue timer

This commit is contained in:
User Infidel
2022-09-25 20:15:32 +07:00
parent b5d0bdf3fd
commit 51e87c037c
5 changed files with 119 additions and 4 deletions

View File

@@ -1,10 +1,33 @@
# What the fuck is this
# KQUEUE Utilization
This is your lame attempt to understand how those Network Virtual Functions sofware works as well to sharpen your understanding on C++ and C programming language.
## Hints
- Compile using `g++`
- Compile using `g++` for the file watcher
To trace the function calls on FreeBSD based system use `truss()` instead of `strace`.
The `kqueue_socket.c` is my attempt on create a socket watcher timer program using `kevent`.
- ![KQUEUE NETBSD GUIDE](https://wiki.netbsd.org/tutorials/kqueue_tutorial/)
```
struct kevent my_event;
struct kevent my_change;
EV_SET(&my_change, ...); // Initialize the kevent
for(;;){
...;
}
```
## Goal
- Understand the difference between c++ and C