Lely core libraries
2.2.5
|
This header file is part of the event library; it contains the file descriptor event loop declarations. More...
Go to the source code of this file.
Typedefs | |
typedef struct io_fd_loop | io_fd_loop_t |
A file descriptor event loop. | |
Functions | |
io_fd_loop_t * | io_fd_loop_create (io_poll_t *poll) |
Creates a new file descriptor event loop. More... | |
void | io_fd_loop_destroy (io_fd_loop_t *loop) |
Destroys a file descriptor event loop. More... | |
ev_poll_t * | io_fd_loop_get_poll (const io_fd_loop_t *loop) |
Returns a pointer to the polling instance used by the event loop. | |
ev_exec_t * | io_fd_loop_get_exec (const io_fd_loop_t *loop) |
Returns a pointer to the executor corresponding to the event loop. | |
int | io_fd_loop_get_fd (const io_fd_loop_t *loop) |
Returns the file descriptor corresponding to the event loop. | |
void | io_fd_loop_stop (io_fd_loop_t *loop) |
Stops the file descriptor event loop. More... | |
int | io_fd_loop_stopped (io_fd_loop_t *loop) |
Returns 1 if the file descriptor event loop is stopped, and 0 if not. | |
void | io_fd_loop_restart (io_fd_loop_t *loop) |
Restarts a file descriptor event loop. More... | |
size_t | io_fd_loop_run (io_fd_loop_t *loop) |
Equivalent to size_t n = 0; while (io_fd_loop_run_one(loop)) n += n < SIZE_MAX; return n; . | |
This header file is part of the event library; it contains the file descriptor event loop declarations.
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_loop.h.
io_fd_loop_t* io_fd_loop_create | ( | io_poll_t * | poll | ) |
Creates a new file descriptor event loop.
poll | a pointer to the I/O polling instance used to monitor the event loop. |
void io_fd_loop_destroy | ( | io_fd_loop_t * | loop | ) |
Destroys a file descriptor event loop.
void io_fd_loop_stop | ( | io_fd_loop_t * | loop | ) |
Stops the file descriptor event loop.
Subsequent calls to io_fd_loop_run() and io_fd_loop_run_one() will return 0 immediately.
void io_fd_loop_restart | ( | io_fd_loop_t * | loop | ) |
Restarts a file descriptor event loop.