Some changes to the tasks service and the general routing strategy

This commit is contained in:
KimLS
2019-06-10 01:10:28 -07:00
parent b3a3d9bec5
commit 65c9c86556
26 changed files with 360 additions and 314 deletions
+5
View File
@@ -276,6 +276,11 @@ std::string EQ::Net::Packet::GetCString(size_t offset) const
return std::string(str);
}
EQ::Net::StaticPacket EQ::Net::Packet::GetPacket(size_t offset, size_t length) const
{
return EQ::Net::StaticPacket((char*)Data() + offset, length);
}
char ToSafePrint(unsigned char in) {
if (std::isprint(in)) {
return in;
+3 -1
View File
@@ -10,6 +10,7 @@
namespace EQ {
namespace Net {
class StaticPacket;
class Packet
{
public:
@@ -77,6 +78,7 @@ namespace EQ {
double GetDouble(size_t offset) const;
std::string GetString(size_t offset, size_t length) const;
std::string GetCString(size_t offset) const;
StaticPacket GetPacket(size_t offset, size_t length) const;
std::string ToString() const;
std::string ToString(size_t line_length) const;
@@ -127,4 +129,4 @@ namespace EQ {
std::vector<char> m_data;
};
}
}
}