|
poser
A C framework for POsix SERvices
|
Options for creating a local UNIX server. More...
#include <poser/core/server.h>
Public Member Functions | |
| PSC_UnixServerOpts * | PSC_UnixServerOpts_create (const char *name) |
| PSC_UnixServerOpts constructor. | |
| void | PSC_UnixSeverOpts_readBufSize (PSC_UnixServerOpts *self, size_t sz) |
| Set read buffer size. | |
| void | PSC_UnixServerOpts_owner (PSC_UnixServerOpts *self, int uid, int gid) |
| Set ownership of the UNIX socket. | |
| void | PSC_UnixServerOpts_mode (PSC_UnixServerOpts *self, int mode) |
| Set access mode for the UNIX socket. | |
| void | PSC_UnixServerOpts_destroy (PSC_UnixServerOpts *self) |
| PSC_UnixServerOpts destructor. | |
Options for creating a local UNIX server.
| PSC_UnixServerOpts * PSC_UnixServerOpts_create | ( | const char * | name | ) |
PSC_UnixServerOpts constructor.
Creates an options object initialized to default values.
| name | the file name (path) of the socket to listen on |
| void PSC_UnixServerOpts_destroy | ( | PSC_UnixServerOpts * | self | ) |
PSC_UnixServerOpts destructor.
| self | the PSC_UnixServerOpts |
| void PSC_UnixServerOpts_mode | ( | PSC_UnixServerOpts * | self, |
| int | mode | ||
| ) |
Set access mode for the UNIX socket.
When not set, the default mode is 0600, so only the owner can interact with the socket.
| self | the PSC_UnixServerOpts |
| mode | desired access mode |
| void PSC_UnixServerOpts_owner | ( | PSC_UnixServerOpts * | self, |
| int | uid, | ||
| int | gid | ||
| ) |
Set ownership of the UNIX socket.
When set, an attempt is made to change ownership of the socket.
| self | the PSC_UnixServerOpts |
| uid | desired owner for the socket, -1 for no change |
| gid | desired group for the socket, -1 for no change |
| void PSC_UnixSeverOpts_readBufSize | ( | PSC_UnixServerOpts * | self, |
| size_t | sz | ||
| ) |
Set read buffer size.
Sets the size of the buffer used for connections accepted from this server, in bytes. The default value is 16 kiB.
| self | the PSC_UnixServerOpts |
| sz | the size of the read buffer, must be > 0 |