Lely core libraries 2.3.4
|
This file is part of the I/O library; it contains the implementation of the common file descriptor functions. More...
Go to the source code of this file.
Functions | |
int | io_fd_set_cloexec (int fd) |
Sets the FD_CLOEXEC flag of the file descriptor fd. More... | |
int | io_fd_set_nonblock (int fd) |
Sets the O_NONBLOCK flag of the file descriptor fd. More... | |
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() . More... | |
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 supports the MSG_DONTWAIT flag) and timeout is non-negative, this function behaves as if fd is blocking and the SO_RCVTIMEO option is set with timeout milliseconds. More... | |
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 implementation supports the MSG_DONTWAIT flag) and timeout is non-negative, this function behaves as if fd is blocking and the SO_SNDTIMEO option is set with timeout milliseconds. More... | |
This file is part of the I/O library; it contains the implementation of the common file descriptor functions.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file fd.c.
int io_fd_set_cloexec | ( | int | fd | ) |
int io_fd_set_nonblock | ( | int | fd | ) |
int io_fd_wait | ( | int | fd, |
int * | events, | ||
int | timeout | ||
) |
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 supports the MSG_DONTWAIT
flag) and timeout is non-negative, this function behaves as if fd is blocking and the SO_RCVTIMEO
option is set with timeout milliseconds.
The timeout interval will be rounded up to the system clock granularity, but this function MAY return early if interrupted by a signal.
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 implementation supports the MSG_DONTWAIT
flag) and timeout is non-negative, this function behaves as if fd is blocking and the SO_SNDTIMEO
option is set with timeout milliseconds.
The timeout interval will be rounded up to the system clock granularity, but this function MAY return early if interrupted by a signal.