about summary refs log tree commit diff
path: root/sami.h
blob: 53e5ad8ce0998f635ab9bb7631c9bfef71f5068b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef __SAMI_H__
#define __SAMI_H__

#include <stddef.h>
#include <unistd.h>

extern int SAMI__fd;

struct SAMI
{
	int fd;
	pid_t pid;
};
typedef struct SAMI SAMI;

typedef void SAMI_Handler(void *arg);

int SAMI_make(SAMI *actor, SAMI_Handler *handler, void *arg);
int SAMI_send(SAMI *actor, void *buf, size_t length);
int SAMI_recv(void *buf, size_t length);
int SAMI_kill(SAMI *actor);

#endif /* __SAMI_H__ */