XNSim/XNServices/XNUDPService/XNUDPService.h

28 lines
589 B
C
Raw Normal View History

2025-04-28 12:25:20 +08:00
#pragma once
#include "XNUDPService_global.h"
#include <XNCore/XNServiceObject.h>
2025-05-22 16:22:48 +08:00
#include <string>
#include <memory>
struct XNUDPServicePrivate;
2025-04-28 12:25:20 +08:00
class XNUDPSERVICE_EXPORT XNUDPService : public XNServiceObject
{
2025-05-22 16:22:48 +08:00
XN_METATYPE(XNUDPService, XNServiceObject)
XN_DECLARE_PRIVATE(XNUDPService)
2025-04-28 12:25:20 +08:00
public:
2025-05-22 16:22:48 +08:00
explicit XNUDPService();
2025-04-28 12:25:20 +08:00
virtual ~XNUDPService();
protected:
2025-05-22 16:22:48 +08:00
XNUDPService(PrivateType *p);
2025-04-28 12:25:20 +08:00
public:
2025-05-22 16:22:48 +08:00
virtual void Initialize() override;
virtual void PrepareForExecute() override;
void HandleIncomingData();
void SendData(const std::any &data);
2025-04-28 12:25:20 +08:00
};
2025-05-22 16:22:48 +08:00
XNCLASS_PTR_DECLARE(XNUDPService)