-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f46031c
commit 7f3c9e3
Showing
27 changed files
with
398 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
// | ||
// Created by david on 11/28/24. | ||
// | ||
#include <iostream> | ||
|
||
#include "io_handler.h" | ||
|
||
io_handler::~io_handler() noexcept | ||
{ | ||
} | ||
#include "io_handler.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
// | ||
// Created by david on 11/28/24. | ||
// | ||
|
||
#include "timer_handler.h" | ||
|
||
timer_handler::~timer_handler() | ||
{ | ||
detach_reactor(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// | ||
// Created by david on 12/3/24. | ||
// | ||
|
||
#include "wakeup_operation.h" | ||
|
||
void wakeup_operation::handle_wakeup(void *data, size_t size) | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// Created by david on 12/3/24. | ||
// | ||
|
||
#ifndef WAKEUP_OPERATION_H | ||
#define WAKEUP_OPERATION_H | ||
#include <unistd.h> | ||
#include <cstdint> | ||
|
||
class wakeup_operation { | ||
public: | ||
wakeup_operation() = default; | ||
~wakeup_operation() = default; | ||
virtual void handle_wakeup(void* data, size_t size); | ||
}; | ||
|
||
|
||
|
||
#endif //WAKEUP_OPERATION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Created by david on 12/3/24. | ||
// | ||
|
||
#include <cstring> | ||
|
||
#include "wakeup_handler.h" | ||
#include "../reactor.h" | ||
|
||
void wakeup_handler::handle_timeout() | ||
{ | ||
io_handler::handle_timeout(); | ||
} | ||
|
||
|
||
void wakeup_handler::handle_io(int events) | ||
{ | ||
if (events & EV_READ) | ||
{ | ||
handle_wakeup(); | ||
} | ||
} | ||
void wakeup_handler::handle_reactor_attached() | ||
{ | ||
attached_reactor()->add_io_handler(std::dynamic_pointer_cast<io_handler>(shared_from_this()),EV_READ); | ||
} |
Oops, something went wrong.