2011-12-10 18:34:14 +08:00
|
|
|
#ifndef UNIX_SOCKET_H
|
|
|
|
#define UNIX_SOCKET_H
|
|
|
|
|
2021-03-16 05:08:25 +08:00
|
|
|
struct unix_stream_listen_opts {
|
|
|
|
int listen_backlog_size;
|
2021-03-16 05:08:26 +08:00
|
|
|
unsigned int disallow_chdir:1;
|
2021-03-16 05:08:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#define UNIX_STREAM_LISTEN_OPTS_INIT { 0 }
|
|
|
|
|
2021-03-16 05:08:26 +08:00
|
|
|
int unix_stream_connect(const char *path, int disallow_chdir);
|
2021-03-16 05:08:25 +08:00
|
|
|
int unix_stream_listen(const char *path,
|
|
|
|
const struct unix_stream_listen_opts *opts);
|
2011-12-10 18:34:14 +08:00
|
|
|
|
|
|
|
#endif /* UNIX_SOCKET_H */
|