summaryrefslogtreecommitdiff
path: root/examples/echo.c
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2025-02-02 14:38:13 +0100
committerMitya Selivanov <automainint@guattari.tech>2025-02-02 14:38:13 +0100
commit27b4343c2a7e2583881485a5ac667894fec729f0 (patch)
tree018df2c4df87ef39f9c828a1d6e255825ee7ed9b /examples/echo.c
parentbc9e6042e709b7790f2f130dde08b13c929653b1 (diff)
downloadreduced_system_layer-27b4343c2a7e2583881485a5ac667894fec729f0.zip
Refactor, renaming (work in progress)perf
Diffstat (limited to 'examples/echo.c')
-rw-r--r--examples/echo.c8
1 files changed, 4 insertions, 4 deletions
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;
}