mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-19 13:27:10 +00:00
perf[protocol]: 使用模板生成协议
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{}
|
||||
const {} = function({}) {
|
||||
{}
|
||||
};
|
||||
|
||||
{}.prototype.protocolId = function() {
|
||||
return {};
|
||||
};
|
||||
|
||||
{}.write = function(buffer, packet) {
|
||||
if (buffer.writePacketFlag(packet)) {
|
||||
return;
|
||||
}
|
||||
{}
|
||||
};
|
||||
|
||||
{}.read = function(buffer) {
|
||||
if (!buffer.readBoolean()) {
|
||||
return null;
|
||||
}
|
||||
const packet = new {}();
|
||||
{}
|
||||
return packet;
|
||||
};
|
||||
|
||||
export default {};
|
||||
Reference in New Issue
Block a user