summaryrefslogtreecommitdiff
path: root/examples/echo.c
diff options
context:
space:
mode:
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;
}