Response.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_RESPONSE_H
12#define SQUID_IPC_RESPONSE_H
13
14#include "base/RefCount.h"
15#include "base/TypeTraits.h"
16#include "ipc/QuestionerId.h"
17#include "ipc/RequestId.h"
18
19namespace Ipc
20{
21
23class Response: public RefCountable, public Interface
24{
25public:
27
28public:
29 virtual void pack(TypedMsgHdr& msg) const = 0;
30 virtual Pointer clone() const = 0;
31
34
35public:
37
38protected:
40 explicit Response(const RequestId aRequestId): requestId(aRequestId) {}
41
43 Response() = default;
44};
45
46} // namespace Ipc
47
48#endif /* SQUID_IPC_RESPONSE_H */
49
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
QuestionerId questioner() const
Definition: RequestId.h:44
A response to Ipc::Request.
Definition: Response.h:24
RefCount< Response > Pointer
Definition: Response.h:26
virtual void pack(TypedMsgHdr &msg) const =0
prepare for sendmsg()
Response()=default
recipient's constructor
RequestId requestId
the ID of the request we are responding to
Definition: Response.h:36
Response(const RequestId aRequestId)
sender's constructor
Definition: Response.h:40
virtual Pointer clone() const =0
returns a copy of this
QuestionerId intendedRecepient() const
for Mine() tests
Definition: Response.h:33
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:35
convenience base for any class with pure virtual method(s)
Definition: TypeTraits.h:19
Definition: IpcIoFile.h:24

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors