]> git.ipfire.org Git - thirdparty/squid.git/blame - src/tests/stub_comm.cc
Merge form trunk
[thirdparty/squid.git] / src / tests / stub_comm.cc
CommitLineData
c8f4eac4 1/*
262a0e14 2 * $Id$
c8f4eac4 3 *
4 * DEBUG: section 84 Helper process maintenance
5 * AUTHOR: Robert Collins
6 *
7 * SQUID Web Proxy Cache http://www.squid-cache.org/
8 * ----------------------------------------------------------
9 *
10 * Squid is the result of efforts by numerous individuals from
11 * the Internet community; see the CONTRIBUTORS file for full
12 * details. Many organizations have provided support for Squid's
13 * development; see the SPONSORS file for full details. Squid is
14 * Copyrighted (C) 2001 by the Regents of the University of
15 * California; see the COPYRIGHT file for full details. Squid
16 * incorporates software developed and/or copyrighted by other
17 * sources; see the CREDITS file for full details.
18 *
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2 of the License, or
22 * (at your option) any later version.
26ac0430 23 *
c8f4eac4 24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
26ac0430 28 *
c8f4eac4 29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
32 *
33 */
34
35#include "squid.h"
36#include "comm.h"
a553a5a3 37#include "CommRead.h"
c8f4eac4 38#include "fde.h"
39
40DeferredReadManager::~DeferredReadManager()
41{
42 /* no networked tests yet */
43}
44
45DeferredRead::DeferredRead (DeferrableRead *, void *, CommRead const &)
46{
47 fatal ("Not implemented");
48}
49
50void
51DeferredReadManager::delayRead(DeferredRead const &aRead)
52{
53 fatal ("Not implemented");
54}
55
56void
57DeferredReadManager::kickReads(int const count)
58{
59 fatal ("Not implemented");
60}
61
62void
ec20038e 63comm_read(const Comm::ConnectionPointer &conn, char *buf, int size, IOCB *handler, void *handler_data)
c8f4eac4 64{
65 fatal ("Not implemented");
66}
67
1515a285 68void
ec20038e 69comm_read(const Comm::ConnectionPointer &conn, char*, int, AsyncCall::Pointer &callback)
1515a285 70{
71 fatal ("Not implemented");
72}
73
c8f4eac4 74/* should be in stub_CommRead */
75#include "CommRead.h"
1515a285 76CommRead::CommRead (int fd, char *buf, int len, AsyncCall::Pointer &callback)
c8f4eac4 77{
78 fatal ("Not implemented");
79}
80
81CommRead::CommRead ()
82{
83 fatal ("Not implemented");
84}
85
86void
87commSetCloseOnExec(int fd)
88{
89 /* for tests... ignore */
90}
91
92void
93commSetSelect(int fd, unsigned int type, PF * handler, void *client_data,
94 time_t timeout)
95{
96 /* all test code runs synchronously at the moment */
97}
98
638b9bab
AJ
99void
100comm_quick_poll_required()
101{
9e008dda 102 /* for tests ... ignore */
638b9bab
AJ
103}
104
c8f4eac4 105int
106ignoreErrno(int ierrno)
107{
108 fatal ("Not implemented");
109 return -1;
110}
111
112int
113commSetTimeout(int fd, int timeout, PF * handler, void *data)
114{
115 fatal ("Not implemented");
116 return -1;
117}
118
638b9bab
AJ
119int
120commSetNonBlocking(int fd)
121{
122 fatal ("Not implemented");
123 return COMM_ERROR;
124}
125
c8f4eac4 126int
127commUnsetNonBlocking(int fd)
128{
129 fatal ("Not implemented");
130 return -1;
131}
132
133/* bah, cheating on stub count */
134
e3f1f75d 135pid_t
b7ac5457 136ipcCreate(int type, const char *prog, const char *const args[], const char *name, Ip::Address &local_addr, int *rfd, int *wfd, void **hIpc)
c8f4eac4 137{
138 fatal ("Not implemented");
139 return -1;
140}
141
142void
143comm_init(void)
144{
145 fd_table =(fde *) xcalloc(Squid_MaxFD, sizeof(fde));
146
147 /* Keep a few file descriptors free so that we don't run out of FD's
148 * after accepting a client but before it opens a socket or a file.
149 * Since Squid_MaxFD can be as high as several thousand, don't waste them */
d85c3078 150 RESERVED_FD = min(100, Squid_MaxFD / 4);
c8f4eac4 151}
152
322f8ea8 153/* MinGW needs also a stub of _comm_close() */
154void
155_comm_close(int fd, char const *file, int line)
156{
157 fatal ("Not implemented");
158}
8822ebee
AR
159
160int
161commSetTimeout(int fd, int timeout, AsyncCall::Pointer& callback)
162{
163 fatal ("Not implemented");
164 return -1;
165}
166
167int
168comm_open_uds(int sock_type, int proto, struct sockaddr_un* addr, int flags)
169{
170 fatal ("Not implemented");
171 return -1;
172}
173
174void
175comm_write(int fd, const char *buf, int size, AsyncCall::Pointer &callback, FREE * free_func)
176{
177 fatal ("Not implemented");
178}
179
180ConnectionDetail::ConnectionDetail() : me(), peer()
181{
182 fatal ("Not implemented");
183}