Go to file
2022-09-25 20:16:54 +07:00
bin kqueue timer 2022-09-25 20:15:32 +07:00
.gitignore Add gitignore 2022-09-23 00:06:51 +07:00
kqueue_file_watch.cpp kqueue timer 2022-09-25 20:15:32 +07:00
kqueue_socket.c kqueue timer 2022-09-25 20:15:32 +07:00
README.md Fix broken url 2022-09-25 20:16:54 +07:00

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++ 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.


    struct kevent my_event;
    struct kevent my_change;

    EV_SET(&my_change, ...); // Initialize the kevent

    for(;;){

        ...;

    }

    

Goal

  • Understand the difference between c++ and C
  • Understand how strcuct works and the difference between it on c++ and C
  • Understand

Issues

  • Modification to target file only detected after 2 or more interrupt