From 27b4343c2a7e2583881485a5ac667894fec729f0 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Sun, 2 Feb 2025 14:38:13 +0100 Subject: Refactor, renaming (work in progress) --- examples/echo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/echo.c') diff --git a/examples/echo.c b/examples/echo.c index 10f3cd5..1671be7 100644 --- a/examples/echo.c +++ b/examples/echo.c @@ -41,7 +41,7 @@ i32 main(i32 argc, c8 **argv) { printf("Receiving UDP messages on port %d\n\n", PORT); for (;;) { - i64 n = p_recv( + i64 n = network_recv( 0, (IP_Address) { .protocol = IPv4_UDP, @@ -61,7 +61,7 @@ i32 main(i32 argc, c8 **argv) { buf[n] = '\0'; printf("%s\n", buf); } else - p_sleep_for(10); + suspend_thread_for_milliseconds(10); } } break; @@ -75,7 +75,7 @@ i32 main(i32 argc, c8 **argv) { if (strcmp(buf, "!quit") == 0) break; - p_send( + network_send( 0, (IP_Address) { .protocol = IPv4_UDP, @@ -94,6 +94,6 @@ i32 main(i32 argc, c8 **argv) { default:; } - p_cleanup(); + shutdown_all_systems(); return 0; } -- cgit v1.2.3