Request.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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_REQUEST_H
12 #define SQUID_IPC_REQUEST_H
13 
14 #include "base/RefCount.h"
15 #include "ipc/forward.h"
16 
17 namespace Ipc
18 {
19 
21 class Request: public RefCountable
22 {
23 public:
25 
26 public:
27  Request(int aRequestorId, unsigned int aRequestId):
28  requestorId(aRequestorId), requestId(aRequestId) {}
29 
30  virtual void pack(TypedMsgHdr& msg) const = 0;
31  virtual Pointer clone() const = 0;
32 
33 private:
34  Request(const Request&); // not implemented
35  Request& operator= (const Request&); // not implemented
36 
37 public:
39  unsigned int requestId;
40 };
41 
42 } // namespace Ipc
43 
44 #endif /* SQUID_IPC_REQUEST_H */
45 
virtual Pointer clone() const =0
returns a copy of this
Request(int aRequestorId, unsigned int aRequestId)
Definition: Request.h:27
virtual void pack(TypedMsgHdr &msg) const =0
prepare for sendmsg()
unsigned int requestId
unique for sender; matches request w/ response
Definition: Request.h:39
int requestorId
kidId of the requestor; used for response destination
Definition: Request.h:38
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:31
Request & operator=(const Request &)
RefCount< Request > Pointer
Definition: Request.h:24
IPC request.
Definition: Request.h:21

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors