Lely core libraries  2.2.5
fd.h
Go to the documentation of this file.
1 
21 #ifndef LELY_IO2_INTERN_POSIX_FD_H_
22 #define LELY_IO2_INTERN_POSIX_FD_H_
23 
24 #include "io.h"
25 
26 #if _POSIX_C_SOURCE >= 200112L
27 
28 #include <sys/socket.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
40 int io_fd_set_cloexec(int fd);
41 
48 int io_fd_set_nonblock(int fd);
49 
57 int io_fd_wait(int fd, int *events, int timeout);
58 
67 ssize_t io_fd_recvmsg(int fd, struct msghdr *msg, int flags, int timeout);
68 
77 ssize_t io_fd_sendmsg(int fd, const struct msghdr *msg, int flags, int timeout);
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif // _POSIX_C_SOURCE >= 200112L
84 
85 #endif // !LELY_IO2_INTERN_POSIX_FD_H_
io_fd_set_cloexec
int io_fd_set_cloexec(int fd)
Sets the FD_CLOEXEC flag of the file descriptor fd.
Definition: fd.c:33
io_fd_wait
int io_fd_wait(int fd, int *events, int timeout)
Waits for one or more of the I/O events in *events to occur as if by POSIX poll().
Definition: fd.c:55
io_fd_sendmsg
ssize_t io_fd_sendmsg(int fd, const struct msghdr *msg, int flags, int timeout)
Equivalent to POSIX sendmsg(fd, msg, flags | MSG_NOSIGNAL), except that if fd is non-blocking (or the...
Definition: fd.c:116
io_fd_set_nonblock
int io_fd_set_nonblock(int fd)
Sets the O_NONBLOCK flag of the file descriptor fd.
Definition: fd.c:44
io.h
io_fd_recvmsg
ssize_t io_fd_recvmsg(int fd, struct msghdr *msg, int flags, int timeout)
Equivalent to POSIX recvmsg(fd, msg, flags), except that if fd is non-blocking (or the implementation...
Definition: fd.c:80