From 7a3999d7d809d6a3c25aeaa05f9acd17113b0709 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Sat, 30 Aug 2025 15:16:25 +0300 Subject: Change API - now there's no SAMI_recv(), but handler is called each time message is received - children can send messages to their parent, which is obtainable using SAMI_parent() --- README | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'README') diff --git a/README b/README index 1f0cb82..6cc1e88 100644 --- a/README +++ b/README @@ -7,25 +7,27 @@ SYNOPSIS #include int - SAMI_make(SAMI *actor, SAMI_Handler *handler, void *arg); + SAMI_make(SAMI *actor, SAMI_Handler *handler); int SAMI_send(SAMI *actor, void *buf, size_t length); - int - SAMI_recv(void *buf, size_t length); - int SAMI_kill(SAMI *actor); + SAMI * + SAMI_parent(void); + DESCRIPTION sami is a library for handling actors. It uses fork(2) for making actors, and unix(7) sockets for message delivering. RETURN VALUE - All functions return 0 on success, and any other number on failure. + Functions usually return 0 on success, and any other number on failure. Consider checking errno(7) in the latter case. + SAMI_parent() returns a valid pointer. + SEE ALSO fork(2), unix(7) -- cgit 1.4.1