]> git.ipfire.org Git - thirdparty/squid.git/blob - src/comm/Write.h
Removed squid-old.h
[thirdparty/squid.git] / src / comm / Write.h
1 #ifndef _SQUID_COMM_IOWRITE_H
2 #define _SQUID_COMM_IOWRITE_H
3
4 #include "base/AsyncCall.h"
5 #include "comm/forward.h"
6 #include "typedefs.h"
7
8 class MemBuf;
9 namespace Comm
10 {
11
12 /**
13 * Queue a write. callback is scheduled when the write
14 * completes, on error, or on file descriptor close.
15 *
16 * free_func is used to free the passed buffer when the write has completed.
17 */
18 void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func);
19
20 /**
21 * Queue a write. callback is scheduled when the write
22 * completes, on error, or on file descriptor close.
23 */
24 void Write(const Comm::ConnectionPointer &conn, MemBuf *mb, AsyncCall::Pointer &callback);
25
26 /// Cancel the write pending on FD. No action if none pending.
27 void WriteCancel(const Comm::ConnectionPointer &conn, const char *reason);
28
29 // callback handler to process an FD which is available for writing.
30 extern PF HandleWrite;
31
32 } // namespace Comm
33
34 #endif /* _SQUID_COMM_IOWRITE_H */