]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/stub_comm.cc
2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
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.
10 #include "comm/Connection.h"
11 #include "comm/Loops.h"
14 #define STUB_API "comm.cc"
15 #include "tests/STUB.h"
19 void comm_read(const Comm::ConnectionPointer
&conn
, char *buf
, int size
, IOCB
*handler
, void *handler_data
) STUB
20 void comm_read(const Comm::ConnectionPointer
&conn
, char*, int, AsyncCall::Pointer
&callback
) STUB
22 /* should be in stub_CommRead */
24 CommRead::CommRead(const Comm::ConnectionPointer
&, char *, int, AsyncCall::Pointer
&) STUB
25 CommRead::CommRead() STUB
26 DeferredReadManager::~DeferredReadManager() STUB
27 DeferredRead::DeferredRead(DeferrableRead
*, void *, CommRead
const &) STUB
28 void DeferredReadManager::delayRead(DeferredRead
const &aRead
) STUB
29 void DeferredReadManager::kickReads(int const count
) STUB
32 bool comm_iocallbackpending(void) STUB_RETVAL(false)
33 int commSetNonBlocking(int fd
) STUB_RETVAL(Comm::COMM_ERROR
)
34 int commUnsetNonBlocking(int fd
) STUB_RETVAL(-1)
35 void commSetCloseOnExec(int fd
) STUB_NOP
36 void commSetTcpKeepalive(int fd
, int idle
, int interval
, int timeout
) STUB
37 void _comm_close(int fd
, char const *file
, int line
) STUB
38 void old_comm_reset_close(int fd
) STUB
39 void comm_reset_close(const Comm::ConnectionPointer
&conn
) STUB
41 void comm_lingering_close(int fd
) STUB
43 int comm_connect_addr(int sock
, const Ip::Address
&addr
) STUB_RETVAL(-1)
44 void comm_init(void) STUB
45 void comm_exit(void) STUB
46 int comm_open(int, int, Ip::Address
&, int, const char *note
) STUB_RETVAL(-1)
47 int comm_open_uds(int sock_type
, int proto
, struct sockaddr_un
* addr
, int flags
) STUB_RETVAL(-1)
48 void comm_import_opened(const Comm::ConnectionPointer
&, const char *note
, struct addrinfo
*AI
) STUB
49 int comm_open_listener(int sock_type
, int proto
, Ip::Address
&addr
, int flags
, const char *note
) STUB_RETVAL(-1)
50 void comm_open_listener(int sock_type
, int proto
, Comm::ConnectionPointer
&conn
, const char *note
) STUB
51 int comm_openex(int, int, Ip::Address
&, int, tos_t tos
, nfmark_t nfmark
, const char *) STUB_RETVAL(-1)
52 unsigned short comm_local_port(int fd
) STUB_RETVAL(0)
53 int comm_udp_sendto(int sock
, const Ip::Address
&to
, const void *buf
, int buflen
) STUB_RETVAL(-1)
54 void commCallCloseHandlers(int fd
) STUB
55 void commUnsetFdTimeout(int fd
) STUB
56 int commSetTimeout(const Comm::ConnectionPointer
&, int, AsyncCall::Pointer
&) STUB_RETVAL(-1)
57 int commSetConnTimeout(const Comm::ConnectionPointer
&conn
, int seconds
, AsyncCall::Pointer
&callback
) STUB_RETVAL(-1)
58 int commUnsetConnTimeout(const Comm::ConnectionPointer
&conn
) STUB_RETVAL(-1)
59 int ignoreErrno(int ierrno
) STUB_RETVAL(-1)
60 void commCloseAllSockets(void) STUB
61 void checkTimeouts(void) STUB
62 AsyncCall::Pointer
comm_add_close_handler(int fd
, CLCB
*, void *) STUB
63 void comm_add_close_handler(int fd
, AsyncCall::Pointer
&) STUB
64 void comm_remove_close_handler(int fd
, CLCB
*, void *) STUB
65 void comm_remove_close_handler(int fd
, AsyncCall::Pointer
&)STUB
66 int comm_udp_recvfrom(int fd
, void *buf
, size_t len
, int flags
, Ip::Address
&from
) STUB_RETVAL(-1)
67 int comm_udp_recv(int fd
, void *buf
, size_t len
, int flags
) STUB_RETVAL(-1)
68 ssize_t
comm_udp_send(int s
, const void *buf
, size_t len
, int flags
) STUB_RETVAL(-1)
69 bool comm_has_incomplete_write(int) STUB_RETVAL(false)
70 void commStartHalfClosedMonitor(int fd
) STUB
71 bool commHasHalfClosedMonitor(int fd
) STUB_RETVAL(false)
72 int CommSelectEngine::checkEvents(int timeout
) STUB_RETVAL(0)