Squid Web Cache master
Loading...
Searching...
No Matches
select.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#include "squid.h"
10#include "compat/select.h"
11#include "compat/wserrno.h"
12
13#if _SQUID_WINDOWS_ || _SQUID_MINGW_
14
15int
16xselect(int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval * timeout)
17{
18 const auto result = select(nfds, readfds, writefds, exceptfds, timeout);
19 if (result == SOCKET_ERROR)
20 SetErrnoFromWsaError();
21 return result;
22}
23
24#endif /* _SQUID_WINDOWS_ || _SQUID_MINGW_ */
int xselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
POSIX select(2) equivalent.
Definition select.h:22