about summary refs log tree commit diff
path: root/README
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-08-30 15:16:25 +0300
committerNakidai <nakidai@disroot.org>2025-08-30 15:16:25 +0300
commit7a3999d7d809d6a3c25aeaa05f9acd17113b0709 (patch)
tree8f6aa95411a9dd81cae7fa5cd01fc0e2d302bc52 /README
parent793f83080b8eb91f8c70fadc5911d0ea4f9829ff (diff)
downloadsami-7a3999d7d809d6a3c25aeaa05f9acd17113b0709.tar.gz
sami-7a3999d7d809d6a3c25aeaa05f9acd17113b0709.zip
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()
Diffstat (limited to 'README')
-rw-r--r--README12
1 files changed, 7 insertions, 5 deletions
diff --git a/README b/README
index 1f0cb82..6cc1e88 100644
--- a/README
+++ b/README
@@ -7,25 +7,27 @@ SYNOPSIS
      #include <sami.h>
 
      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)