]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/comm/Write.h
2 * Copyright (C) 1996-2016 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.
9 #ifndef _SQUID_COMM_IOWRITE_H
10 #define _SQUID_COMM_IOWRITE_H
12 #include "base/AsyncCall.h"
13 #include "comm/forward.h"
14 #include "mem/forward.h"
21 * Queue a write. callback is scheduled when the write
22 * completes, on error, or on file descriptor close.
24 * free_func is used to free the passed buffer when the write has completed.
26 void Write(const Comm::ConnectionPointer
&conn
, const char *buf
, int size
, AsyncCall::Pointer
&callback
, FREE
*free_func
);
29 * Queue a write. callback is scheduled when the write
30 * completes, on error, or on file descriptor close.
32 void Write(const Comm::ConnectionPointer
&conn
, MemBuf
*mb
, AsyncCall::Pointer
&callback
);
34 /// Cancel the write pending on FD. No action if none pending.
35 void WriteCancel(const Comm::ConnectionPointer
&conn
, const char *reason
);
37 // callback handler to process an FD which is available for writing.
38 extern PF HandleWrite
;
42 #endif /* _SQUID_COMM_IOWRITE_H */