mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 13:48:22 +00:00
Some changes to the tasks service and the general routing strategy
This commit is contained in:
@@ -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
@@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user