picloud
This commit is contained in:
@@ -19,10 +19,24 @@
|
||||
|
||||
#include "picloudtcp.h"
|
||||
#include "picrypt.h"
|
||||
#include "pichunkstream.h"
|
||||
|
||||
|
||||
const char hash_def_key[] = "_picrypt_";
|
||||
|
||||
|
||||
PIByteArray & operator <<(PIByteArray & s, const PICloud::Header & v) {
|
||||
s << v.version << v.type << v.sname;
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
PIByteArray & operator >>(PIByteArray & s, PICloud::Header & v) {
|
||||
s >> v.version >> v.type >> v.sname;
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
PICloudTCP::PICloudTCP() {
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,30 @@
|
||||
#include "pip_cloud_export.h"
|
||||
#include "pistring.h"
|
||||
|
||||
namespace PICloud {
|
||||
|
||||
enum Version {
|
||||
Version_1 = 1,
|
||||
};
|
||||
|
||||
enum HeaderType {
|
||||
Server = 1,
|
||||
Client = 2,
|
||||
};
|
||||
|
||||
struct PIP_CLOUD_EXPORT Header {
|
||||
Header() {
|
||||
version = Version_1;
|
||||
}
|
||||
uchar version; // PICloud::Version
|
||||
uchar type; // PICloud::HeaderType
|
||||
PIString sname; // server name
|
||||
};
|
||||
}
|
||||
|
||||
PIP_CLOUD_EXPORT PIByteArray & operator <<(PIByteArray & s, const PICloud::Header & v);
|
||||
PIP_CLOUD_EXPORT PIByteArray & operator >>(PIByteArray & s, PICloud::Header & v);
|
||||
|
||||
|
||||
class PIP_CLOUD_EXPORT PICloudTCP {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user