]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/comm/forward.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / comm / forward.h
index a08d82ea4faf60a861e02bcf05d63a0555add26f..20c459dd44b36447b8f64e90ed9702ecb0ae7c7d 100644 (file)
@@ -1,19 +1,42 @@
+/*
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 #ifndef _SQUID_COMM_FORWARD_H
 #define _SQUID_COMM_FORWARD_H
 
-#include "Array.h"
-#include "RefCount.h"
+#include "base/RefCount.h"
+
+#include <vector>
+
+/// legacy CBDATA callback functions ABI definition for read or write I/O events
+/// \deprecated use CommCalls API instead where possible
+typedef void PF(int, void *);
 
-namespace Comm {
+/// Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
+namespace Comm
+{
 
 class Connection;
+class ConnOpener;
 
 typedef RefCount<Comm::Connection> ConnectionPointer;
 
-typedef Vector<Comm::ConnectionPointer> ConnectionList;
+typedef std::vector<Comm::ConnectionPointer> ConnectionList;
 
 bool IsConnOpen(const Comm::ConnectionPointer &conn);
 
+// callback handler to process an FD which is available for writing.
+PF HandleWrite;
+
+/// Mark an FD to be watched for its IO status.
+void SetSelect(int, unsigned int, PF *, void *, time_t);
+
 }; // namespace Comm
 
 #endif /* _SQUID_COMM_FORWARD_H */
+