FLImaging 7.8.25.3
DeviceSocketServer.h
1#pragma once
9
10#include "DeviceSocketBase.h"
11
13namespace FLImaging
14{
16 namespace Devices
17 {
19 class CDeviceSocketClientManager;
20
28 class FL_EXPORT CDeviceSocketServer : public CDeviceSocketBase
29 {
30 public:
39
48
49 virtual const CResult Initialize() override;
50 virtual const CResult Terminate() override;
51
67 virtual const CResult SendAll(const CDeviceSocketPacket& packet);
68
84 virtual const CResult SendAll(const CDeviceSocketPacket* pSocketPacket);
85
99 virtual const CResult SetAllowedMaxClients(int32_t i32AllowedMaxClients = -1);
100
110 virtual int32_t GetAllowedMaxClients() const;
111
123 CDeviceSocketClientManager* GetSocketClientManager() const;
124
125 virtual int64_t GetClassType() const override;
126
127 protected:
128
129 CDeviceSocketClientManager* m_pSocketClientManager;
130 HANDLE m_hListingThreadHandle;
131
139 volatile int32_t m_i32AllowedMaxClients;
140
141 static unsigned __stdcall ListeningThread(void* arg);
142
143 friend class CDeviceSocketClientManager;
144 };
145 }
146}
147
FLImaging module execution result object.
Definition ResultsDef.h:1704
CDeviceSocketBase()
Default constructor.
Socket client class.
Definition DeviceSocketClient.h:25
Socket packet class.
Definition DeviceSocketPacket.h:22
virtual const CResult SendAll(const CDeviceSocketPacket *pSocketPacket)
Sends a packet to all connected sockets.
virtual const CResult SendAll(const CDeviceSocketPacket &packet)
Sends a packet to all connected sockets.
CDeviceSocketServer()
Default constructor.
CDeviceSocketClientManager * GetSocketClientManager() const
Get the CDeviceSocketClientManager object of the member variable.
virtual const CResult SetAllowedMaxClients(int32_t i32AllowedMaxClients=-1)
Sets the maximum number of allowed clients.
virtual const CResult Initialize() override
Perform socket initialization. Socket mode settings and connection information settings must be done ...
virtual const CResult Terminate() override
Perform socket shutdown.
volatile int32_t m_i32AllowedMaxClients
Definition DeviceSocketServer.h:139
virtual int32_t GetAllowedMaxClients() const
Returns the configured maximum number of allowed clients.
virtual int64_t GetClassType() const override
Returns the Type value of Class. The returned value itself has no meaning, but if it is the same type...
virtual ~CDeviceSocketServer()
Default destructor.
Definition AutoFileCleaner.h:19