diff options
| author | 2023-11-06 10:33:45 -0500 | |
|---|---|---|
| committer | 2023-11-06 10:33:45 -0500 | |
| commit | 1517f2874ab44fcf210c14e9fdd3f9c1bfd6ba76 (patch) | |
| tree | 641dd55f6677bea75c691b6010c0d7dd2a5f37e8 /test | |
| parent | a723efcc67b6c14ff0dd1efd1ba88596e959daaa (diff) | |
| download | libnaunet-1517f2874ab44fcf210c14e9fdd3f9c1bfd6ba76.tar.gz libnaunet-1517f2874ab44fcf210c14e9fdd3f9c1bfd6ba76.tar.bz2 libnaunet-1517f2874ab44fcf210c14e9fdd3f9c1bfd6ba76.zip | |
Update
- Refactor curl support, add curl websockets
- Remove aki_socket config structure
- Add the ability to change aki_timer repeat
- Various fixes
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test.c b/test/test.c index bf1654b..0b2f680 100644 --- a/test/test.c +++ b/test/test.c @@ -15,11 +15,12 @@ aki_thread_result AKI_THREADCALL test_thread(void *userdata) static struct aki_event_loop loop; -static void line_callback(void *userdata, str *line) +static u8 line_callback(void *userdata, str *line) { (void)userdata; al_printf("%.*s\n", AL_STR_PRINTF(line)); - if (al_str_eq(line, al_str_c("quit"))) aki_event_loop_break(&loop); + if (al_str_eq(line, al_str_c("quit"))) return AKI_LINE_PROCESSOR_STOP; + return AKI_LINE_PROCESSOR_CONTINUE; } static void timer_callback(void *userdata, struct aki_timer *timer) @@ -34,9 +35,11 @@ s32 main(void) aki_event_loop_init(&loop); + /* struct aki_timer timer; aki_timer_init(&timer, &loop, 1.0, timer_callback, NULL); aki_timer_again(&timer); + */ /* struct aki_thread thread; @@ -45,14 +48,12 @@ s32 main(void) */ #ifndef _WIN32 - /* struct aki_line_processor pro; pro.callback = line_callback; pro.userdata = NULL; aki_line_processor_init(&pro, al_str_c("\n")); aki_line_processor_open_fd(&pro, STDIN_FILENO); aki_line_processor_run(&pro, &loop); - */ #endif aki_event_loop_run(&loop); |