Strand.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9/* DEBUG: section 54 Interprocess Communication */
10
11#ifndef SQUID_IPC_STRAND_H
12#define SQUID_IPC_STRAND_H
13
14#include "ipc/forward.h"
15#include "ipc/Port.h"
16#include "mgr/forward.h"
17#if SQUID_SNMP
18#include "snmp/forward.h"
19#endif
20
21namespace Ipc
22{
23
24class StrandCoord;
25
27class Strand: public Port
28{
30
31public:
32 Strand();
33
34 void start() override; // Port (AsyncJob) API
35
36protected:
37 void timedout() override; // Port (UsdOp) API
38 void receive(const TypedMsgHdr &message) override; // Port API
39
40private:
41 void registerSelf();
43 void handleCacheMgrRequest(const Mgr::Request& request);
44 void handleCacheMgrResponse(const Mgr::Response& response);
45#if SQUID_SNMP
46 void handleSnmpRequest(const Snmp::Request& request);
47 void handleSnmpResponse(const Snmp::Response& response);
48#endif
49
50private:
52
53private:
54 Strand(const Strand&); // not implemented
55 Strand& operator =(const Strand&); // not implemented
56};
57
58}
59
60#endif /* SQUID_IPC_STRAND_H */
61
Waits for and receives incoming IPC messages; kids handle the messages.
Definition: Port.h:22
an IPC message carrying StrandCoord
Definition: StrandCoord.h:39
Receives coordination messages on behalf of its process or thread.
Definition: Strand.h:28
void handleCacheMgrRequest(const Mgr::Request &request)
Definition: Strand.cc:133
void handleRegistrationResponse(const StrandMessage &)
let Coordinator know this strand exists
Definition: Strand.cc:120
void receive(const TypedMsgHdr &message) override
Definition: Strand.cc:61
Strand & operator=(const Strand &)
void handleSnmpResponse(const Snmp::Response &response)
Definition: Strand.cc:152
void handleCacheMgrResponse(const Mgr::Response &response)
Definition: Strand.cc:140
bool isRegistered
whether Coordinator ACKed registration (unused)
Definition: Strand.h:51
void timedout() override
called after setTimeout() if timed out
Definition: Strand.cc:159
Strand(const Strand &)
void start() override
called by AsyncStart; do not call directly
Definition: Strand.cc:46
void handleSnmpRequest(const Snmp::Request &request)
Definition: Strand.cc:146
CBDATA_CHILD(Strand)
void registerSelf()
Definition: Strand.cc:52
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:35
cache manager request
Definition: Request.h:24
SNMP request.
Definition: Request.h:25
Definition: IpcIoFile.h:24

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors