picloud
This commit is contained in:
@@ -26,8 +26,6 @@
|
||||
#include "pip_cloud_export.h"
|
||||
#include "piethernet.h"
|
||||
|
||||
class PIEthernet;
|
||||
|
||||
|
||||
class PIP_CLOUD_EXPORT PICloudServer : public PIIODevice
|
||||
{
|
||||
@@ -37,6 +35,18 @@ public:
|
||||
explicit PICloudServer(const PIString & path = PIString(), PIIODevice::DeviceMode mode = PIIODevice::ReadWrite);
|
||||
virtual ~PICloudServer();
|
||||
|
||||
class Client : public PIIODevice {
|
||||
PIIODEVICE(PICloudServer::Client)
|
||||
public:
|
||||
Client(PICloudServer * srv = nullptr);
|
||||
protected:
|
||||
bool openDevice();
|
||||
private:
|
||||
PICloudServer * server;
|
||||
};
|
||||
|
||||
EVENT1(newConnection, PICloudServer::Client * , client)
|
||||
|
||||
protected:
|
||||
bool openDevice();
|
||||
bool closeDevice();
|
||||
@@ -44,7 +54,11 @@ protected:
|
||||
int writeDevice(const void * data, int max_size);
|
||||
|
||||
private:
|
||||
EVENT_HANDLER2(void, readed, uchar * , data, int, size);
|
||||
void sendStart();
|
||||
|
||||
PIEthernet eth;
|
||||
PIVector<Client> clients;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user