libchannel
an abstraction around communications channels
|
libchannel provides an abstraction around communication channels like sockets. More...
Data Structures | |
struct | channel |
[opaque] A communications channel for sending data and capabilities (eg file descriptors and channels). More... | |
struct | message |
[opaque] A message that can be sent over a channel. More... |
Functions | |
struct channel * | channel_wrap_socket (int sock) |
Create a channel that wraps a UNIX domain socket. | |
bool | channel_isvalid (struct channel *) |
Tests the validity of a pointer that claims to be a channel. | |
void | channel_destroy (struct channel *c) |
Free a channel. | |
int | channel_send (struct channel *, struct message *) |
Send data and/or capabilities over a channel. | |
int | channel_size (channel *) |
How many bytes does a particular channel take to store? |
libchannel provides an abstraction around communication channels like sockets.
This allows a message-passing style of interaction, whether the backend is a socket or a function call in the same address space.
void channel_destroy | ( | struct channel * | c | ) |
Free a channel.
c | must be a channel or NULL |
Definition at line 99 of file libchannel.c.
References channel_isvalid().
|
read |
Create a channel that wraps a UNIX domain socket.
sock | A UNIX domain socket. This must be a UDS, rather than e.g. a TCP connection, at least until we figure out how to gracefully degrade when we can't send file descriptors and other channels. |
Definition at line 79 of file libchannel.c.