Free Electron
ChunkSender.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_ChunkSender_h__
8 #define __netsignal_ChunkSender_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 class ChunkSender;
16 
17 class FE_DL_EXPORT ChunkSenderTask: public Thread::Functor
18 {
19  public:
20  ChunkSenderTask(void);
21 virtual void operate(void);
22 
23  sp<ChunkSpool> m_spChunkSpool;
24  sp<Socket> m_spSocket;
25  ChunkSender* m_pChunkSender;
26 };
27 
28 class FE_DL_EXPORT ChunkSender : public Component
29 {
30  public:
31  ChunkSender(void);
32 virtual ~ChunkSender(void);
33 
34 virtual void start(sp<ChunkSpool> spChunkSpool, sp<Socket> spSocket,
35  String ioPriority="normal");
36 virtual void stop(void);
37 virtual bool live(void);
38 
39 virtual void setLive(bool setting);
40 
41  private:
42  Thread* m_pChunkSenderThread;
43  ChunkSenderTask m_chunkSenderTask;
44  bool m_operating;
45  sp<ChunkSpool> m_spChunkSpool;
46  bool m_live;
47  Mutex m_liveMutex;
48 };
49 
50 } /* namespace ext */
51 } /* namespace fe */
52 
53 #endif /* __netsignal_ChunkSender_h__ */
54 
kernel
Definition: namespace.dox:3