]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ipc/Port.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / ipc / Port.h
index ffe791ad3c4b2be70ecd4dc7cf9f93cd08da84db..12a45c0df03456d70fb657109bf64a48d6a26297 100644 (file)
@@ -1,37 +1,39 @@
 /*
- * $Id$
- *
- * DEBUG: section 54    Interprocess Communication
+ * Copyright (C) 1996-2017 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.
  */
 
+/* DEBUG: section 54    Interprocess Communication */
+
 #ifndef SQUID_IPC_PORT_H
 #define SQUID_IPC_PORT_H
 
-
-#include "SquidString.h"
 #include "ipc/UdsOp.h"
-
+#include "SquidString.h"
 
 namespace Ipc
 {
 
-
 /// Waits for and receives incoming IPC messages; kids handle the messages
 class Port: public UdsOp
 {
 public:
     Port(const String &aListenAddr);
+    /// calculates IPC message address for strand #id of processLabel type
+    static String MakeAddr(const char *proccessLabel, int id);
 
-protected:
-    /// calculates IPC message address for strand #id at path
-    static String MakeAddr(const char *path, int id);
+    /// get the IPC message address for coordinator process
+    static String CoordinatorAddr();
 
+protected:
     virtual void start() = 0; // UdsOp (AsyncJob) API; has body
     virtual bool doneAll() const; // UdsOp (AsyncJob) API
 
     /// read the next incoming message
-    void listen();
+    void doListen();
 
     /// handle IPC message just read
     virtual void receive(const TypedMsgHdr& message) = 0;
@@ -43,11 +45,9 @@ private:
     TypedMsgHdr buf; ///< msghdr struct filled by Comm
 };
 
-
-extern const char coordinatorAddr[]; ///< where coordinator listens
-extern const char strandAddrPfx[]; ///< strand's listening address prefix
+extern const char strandAddrLabel[]; ///< strand's listening address unique label
 
 } // namespace Ipc
 
-
 #endif /* SQUID_IPC_PORT_H */
+