]>
Commit | Line | Data |
---|---|---|
c8f4eac4 | 1 | /* |
1515a285 | 2 | * $Id: stub_comm.cc,v 1.7 2008/02/26 00:19:59 rousskov Exp $ |
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 | ||
40 | DeferredReadManager::~DeferredReadManager() | |
41 | { | |
42 | /* no networked tests yet */ | |
43 | } | |
44 | ||
45 | DeferredRead::DeferredRead (DeferrableRead *, void *, CommRead const &) | |
46 | { | |
47 | fatal ("Not implemented"); | |
48 | } | |
49 | ||
50 | void | |
51 | DeferredReadManager::delayRead(DeferredRead const &aRead) | |
52 | { | |
53 | fatal ("Not implemented"); | |
54 | } | |
55 | ||
56 | void | |
57 | DeferredReadManager::kickReads(int const count) | |
58 | { | |
59 | fatal ("Not implemented"); | |
60 | } | |
61 | ||
62 | void | |
63 | comm_read(int fd, char *buf, int size, IOCB *handler, void *handler_data) | |
64 | { | |
65 | fatal ("Not implemented"); | |
66 | } | |
67 | ||
1515a285 | 68 | void |
69 | comm_read(int, char*, int, AsyncCall::Pointer &callback) | |
70 | { | |
71 | fatal ("Not implemented"); | |
72 | } | |
73 | ||
c8f4eac4 | 74 | /* should be in stub_CommRead */ |
75 | #include "CommRead.h" | |
1515a285 | 76 | CommRead::CommRead (int fd, char *buf, int len, AsyncCall::Pointer &callback) |
c8f4eac4 | 77 | { |
78 | fatal ("Not implemented"); | |
79 | } | |
80 | ||
81 | CommRead::CommRead () | |
82 | { | |
83 | fatal ("Not implemented"); | |
84 | } | |
85 | ||
86 | void | |
87 | commSetCloseOnExec(int fd) | |
88 | { | |
89 | /* for tests... ignore */ | |
90 | } | |
91 | ||
92 | void | |
93 | commSetSelect(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 |
99 | void |
100 | comm_quick_poll_required() | |
101 | { | |
9e008dda | 102 | /* for tests ... ignore */ |
638b9bab AJ |
103 | } |
104 | ||
c8f4eac4 | 105 | int |
106 | ignoreErrno(int ierrno) | |
107 | { | |
108 | fatal ("Not implemented"); | |
109 | return -1; | |
110 | } | |
111 | ||
112 | int | |
113 | commSetTimeout(int fd, int timeout, PF * handler, void *data) | |
114 | { | |
115 | fatal ("Not implemented"); | |
116 | return -1; | |
117 | } | |
118 | ||
638b9bab AJ |
119 | int |
120 | commSetNonBlocking(int fd) | |
121 | { | |
122 | fatal ("Not implemented"); | |
123 | return COMM_ERROR; | |
124 | } | |
125 | ||
c8f4eac4 | 126 | int |
127 | commUnsetNonBlocking(int fd) | |
128 | { | |
129 | fatal ("Not implemented"); | |
130 | return -1; | |
131 | } | |
132 | ||
133 | /* bah, cheating on stub count */ | |
134 | ||
e3f1f75d | 135 | pid_t |
ad61a2b4 | 136 | ipcCreate(int type, const char *prog, const char *const args[], const char *name, IpAddress &local_addr, int *rfd, int *wfd, void **hIpc) |
c8f4eac4 | 137 | { |
138 | fatal ("Not implemented"); | |
139 | return -1; | |
140 | } | |
141 | ||
142 | void | |
143 | comm_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 */ | |
150 | RESERVED_FD = XMIN(100, Squid_MaxFD / 4); | |
151 | } | |
152 | ||
322f8ea8 | 153 | /* MinGW needs also a stub of _comm_close() */ |
154 | void | |
155 | _comm_close(int fd, char const *file, int line) | |
156 | { | |
157 | fatal ("Not implemented"); | |
158 | } |