mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-25 01:37:22 +00:00
feat[protocol]: 提升协议的兼容性,协议向前兼容
This commit is contained in:
@@ -88,6 +88,10 @@ namespace CsProtocol.Buffer
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public bool IsReadable()
|
||||
{
|
||||
return writeOffset > readOffset;
|
||||
}
|
||||
|
||||
// -------------------------------------------------write/read-------------------------------------------------
|
||||
public void WriteBool(bool value)
|
||||
@@ -1907,7 +1911,7 @@ namespace CsProtocol.Buffer
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
public void WritePacket<T>(T packet, short protocolId)
|
||||
{
|
||||
IProtocolRegistration protocolRegistration = ProtocolManager.GetProtocol(protocolId);
|
||||
@@ -1920,4 +1924,4 @@ namespace CsProtocol.Buffer
|
||||
return (T) protocolRegistration.Read(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user