Lely core libraries 2.3.4
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
31extern "C" {
32#endif
33
40int io_fd_set_cloexec(int fd);
41
48int io_fd_set_nonblock(int fd);
49
57int io_fd_wait(int fd, int *events, int timeout);
58
67ssize_t io_fd_recvmsg(int fd, struct msghdr *msg, int flags, int timeout);
68
77ssize_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_
int io_fd_set_cloexec(int fd)
Sets the FD_CLOEXEC flag of the file descriptor fd.
Definition fd.c:33
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
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
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
int io_fd_set_nonblock(int fd)
Sets the O_NONBLOCK flag of the file descriptor fd.
Definition fd.c:44
This is the internal header file of the Windows-specific I/O declarations.
ptrdiff_t ssize_t
Used for a count of bytes or an error indication.
Definition types.h:43