1 #ifndef LIBSOCKET_LIBUNIXSOCKET_H_61CF2FC7034E4AD982DA08144D578572 2 #define LIBSOCKET_LIBUNIXSOCKET_H_61CF2FC7034E4AD982DA08144D578572 34 #include <sys/socket.h> 35 #include <sys/types.h> 39 #define LIBSOCKET_STREAM 1 40 #define LIBSOCKET_DGRAM 2 42 #define LIBSOCKET_READ 1 43 #define LIBSOCKET_WRITE 2 59 char* from,
size_t from_size,
62 const char* path,
int sendto_flags);
int accept_unix_stream_socket(int sfd, int flags)
Accept connections on a passive UNIX socket.
int create_unix_dgram_socket(const char *bind_path, int flags)
Create a UNIX DGRAM socket.
int connect_unix_dgram_socket(int sfd, const char *path)
Connect a datagram socket.
ssize_t recvfrom_unix_dgram_socket(int sfd, void *buf, size_t size, char *from, size_t from_size, int recvfrom_flags)
Receive datagram from another UNIX socket.
int create_unix_stream_socket(const char *path, int flags)
Create and connect a new UNIX STREAM socket.
int shutdown_unix_stream_socket(int sfd, int method)
Shut a socket down.
int destroy_unix_socket(int sfd)
Close a socket.
ssize_t sendto_unix_dgram_socket(int sfd, const void *buf, size_t size, const char *path, int sendto_flags)
Send datagram to socket.
int create_unix_server_socket(const char *path, int socktype, int flags)
Create a passive UNIX socket.