#include "setup.h"#include <curl/curl.h>#include "urldata.h"#include "connect.h"#include "select.h"Go to the source code of this file.
Defines | |
| #define | VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE)) |
| #define | VERIFY_SOCK(x) |
| #define | VALID_NFDS(n) (((n) >= 0) && ((n) <= FD_SETSIZE)) |
| #define | VERIFY_NFDS(x) |
| #define | elapsed_ms (int)curlx_tvdiff(curlx_tvnow(), initial_tv) |
| #define | error_is_EINTR (0) |
| #define | SMALL_POLLNFDS 0x20 |
Functions | |
| static int | wait_ms (int timeout_ms) |
| int | Curl_socket_ready (curl_socket_t readfd, curl_socket_t writefd, int timeout_ms) |
| int | Curl_poll (struct pollfd ufds[], unsigned int nfds, int timeout_ms) |
| #define elapsed_ms (int)curlx_tvdiff(curlx_tvnow(), initial_tv) |
Definition at line 76 of file select.c.
Referenced by CreateConnection(), Curl_poll(), Curl_socket_ready(), and wait_ms().
| #define error_is_EINTR (0) |
Definition at line 81 of file select.c.
Referenced by Curl_poll(), Curl_socket_ready(), and wait_ms().
| #define VERIFY_NFDS | ( | x | ) |
Value:
do { \ if(!VALID_NFDS(x)) { \ SET_SOCKERRNO(EINVAL); \ return -1; \ } \ } while(0)
| #define VERIFY_SOCK | ( | x | ) |
Value:
do { \ if(!VALID_SOCK(x)) { \ SET_SOCKERRNO(EINVAL); \ return -1; \ } \ } while(0)
Definition at line 59 of file select.c.
Referenced by Curl_poll(), and Curl_socket_ready().
| int Curl_poll | ( | struct pollfd | ufds[], | |
| unsigned int | nfds, | |||
| int | timeout_ms | |||
| ) |
Definition at line 351 of file select.c.
References CURL_SOCKET_BAD, curlx_tvnow(), EINVAL, elapsed_ms, libtorrent::dht::messages::error, error_is_EINTR, FALSE, pollfd::fd, NULL, POLLIN, POLLOUT, POLLPRI, POLLRDBAND, POLLRDNORM, POLLWRNORM, pollfd::revents, asio::detail::socket_ops::select(), SOCKERRNO, TRUE, timeval::tv_sec, timeval::tv_usec, VERIFY_SOCK, and wait_ms().
Referenced by Curl_telnet().
| int Curl_socket_ready | ( | curl_socket_t | readfd, | |
| curl_socket_t | writefd, | |||
| int | timeout_ms | |||
| ) |
Definition at line 172 of file select.c.
References CURL_CSELECT_ERR, CURL_CSELECT_IN, CURL_CSELECT_OUT, CURL_SOCKET_BAD, curlx_tvnow(), EINVAL, elapsed_ms, libtorrent::dht::messages::error, error_is_EINTR, pollfd::events, pollfd::fd, NULL, POLLERR, POLLHUP, POLLIN, POLLNVAL, POLLOUT, POLLPRI, POLLRDBAND, POLLRDNORM, POLLWRNORM, pollfd::revents, asio::detail::socket_ops::select(), SOCKERRNO, timeval::tv_sec, timeval::tv_usec, VERIFY_SOCK, and wait_ms().
Referenced by AllowServerConnect(), blockread_all(), Curl_ftp_multi_statemach(), Curl_GetFTPResponse(), Curl_proxyCONNECT(), Curl_readwrite(), Curl_SOCKS5(), Curl_tftp(), ftp_easy_statemach(), SocketIsDead(), Transfer(), and waitconnect().
| static int wait_ms | ( | int | timeout_ms | ) | [static] |
Definition at line 106 of file select.c.
References curlx_tvnow(), EINVAL, elapsed_ms, libtorrent::dht::messages::error, error_is_EINTR, NULL, asio::detail::socket_ops::select(), SET_SOCKERRNO, SOCKERRNO, timeval::tv_sec, and timeval::tv_usec.
Referenced by Curl_poll(), and Curl_socket_ready().
1.5.6