Usermode/AxWin4 - Server implementation runnable
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / CIPCChannel_AcessIPCPipe.hpp
1 /*
2  * Acess2 GUI v4
3  * - By John Hodge (thePowersGang)
4  *
5  * CIPCChannel_AcessIPCPipe.hpp
6  * - IPC Channel :: Acess' IPC Pipe /Devices/ipcpipe/<name>
7  */
8 #ifndef _CIPCCHANNEL_ACESSIPCPIPE_HPP_
9 #define _CIPCCHANNEL_ACESSIPCPIPE_HPP_
10
11 #include <IIPCChannel.hpp>
12 #include <CClient.hpp>
13 #include <string>
14 #include <list>
15
16 namespace AxWin {
17
18 class CClient_AcessIPCPipe:
19         public CClient
20 {
21         friend class CIPCChannel_AcessIPCPipe;
22          int    m_fd;
23         ::std::vector<uint8_t>  m_rxbuf;
24 public:
25         CClient_AcessIPCPipe(IIPCChannel& channel, int fd);
26         ~CClient_AcessIPCPipe();
27         
28         void SendMessage(CSerialiser& message);
29         
30         void HandleReceive();
31 };
32
33 class CIPCChannel_AcessIPCPipe:
34         public IIPCChannel
35 {
36          int    m_fd;
37         ::std::list<CClient_AcessIPCPipe>       m_clients;
38 public:
39         CIPCChannel_AcessIPCPipe(const ::std::string& suffix);
40         virtual ~CIPCChannel_AcessIPCPipe();
41         
42         virtual int  FillSelect(fd_set& rfds);
43         virtual void HandleSelect(const fd_set& rfds);
44 };
45
46 }       // namespace AxWin
47
48 #endif
49

UCC git Repository :: git.ucc.asn.au