]> git.ipfire.org Git - thirdparty/squid.git/blame - src/ipc/Strand.h
Portability fix: u_int*_t types are deprecated, replaced with uint*_t
[thirdparty/squid.git] / src / ipc / Strand.h
CommitLineData
10cefb7b 1/*
2 * $Id$
3 *
4 * DEBUG: section 54 Interprocess Communication
5 *
6 */
7
8#ifndef SQUID_IPC_STRAND_H
9#define SQUID_IPC_STRAND_H
10
10cefb7b 11#include "ipc/Port.h"
12
13
14namespace Ipc
15{
16
1bac0258 17class StrandCoord;
7230e9c7 18class Descriptor;
10cefb7b 19
ba568924
AR
20/// Receives coordination messages on behalf of its process or thread
21class Strand: public Port
10cefb7b 22{
10cefb7b 23public:
24 Strand();
25
ba568924
AR
26 virtual void start(); // Port (AsyncJob) API
27
28protected:
29 virtual void timedout(); // Port (UsdOp) API
1bac0258 30 virtual void receive(const TypedMsgHdr &message); // Port API
10cefb7b 31
32private:
ba568924 33 void registerSelf(); /// let Coordinator know this strand exists
1bac0258 34 void handleRegistrationResponse(const StrandCoord &strand);
7230e9c7 35 void putDescriptor(const Descriptor &message);
10cefb7b 36
37private:
ba568924 38 bool isRegistered; ///< whether Coordinator ACKed registration (unused)
10cefb7b 39
ba568924
AR
40private:
41 Strand(const Strand&); // not implemented
42 Strand& operator =(const Strand&); // not implemented
4ea256cd
AR
43
44 CBDATA_CLASS2(Strand);
10cefb7b 45};
46
47
48}
49
50
51#endif /* SQUID_IPC_STRAND_H */