Free Electron
SignalSender.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __netsignal_SignalSender_h__
8 #define __netsignal_SignalSender_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /** Sends signals over a given Socket. This class is a signal handler
15  and simply sends record data over the associated Socket when it handles
16  a signal.
17 
18  This class is intended to be used in conjuction with SignalReceiver.
19 
20  @copydoc SignalSender_info
21  */
22 class SignalSender :
23  virtual public HandlerI,
24  public Initialize<SignalSender>
25 {
26  public:
27  SignalSender(int sid, sp<Scope> spScope,
28  sp<ChunkSpool> spChunkSpool);
29 virtual ~SignalSender(void);
30  void initialize(void);
31 
32 virtual void handle(Record &signal);
33 
34  void setMaxSpoolSize(unsigned int a_size) {m_maxspoolsize=a_size;}
35 
36  private:
37  sp<RecordGroup> m_spRG;
38  sp<data::StreamI> m_spStream;
39  sp<Scope> m_spScope;
40  sp<ChunkSpool> m_spChunkSpool;
41  FE_UWORD m_sid;
42  Accessor<int> m_aSID;
43  unsigned int m_maxspoolsize;
44 };
45 
46 } /* namespace ext */
47 } /* namespace fe */
48 
49 #endif /* __netsignal_SignalSender_h__ */
50 
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Interface to handle signals from an SignalerI.
Definition: HandlerI.h:22
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Sends signals over a given Socket.
Definition: SignalSender.h:22