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