mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-21 10:26:32 +00:00
29 lines
535 B
Python
29 lines
535 B
Python
{}
|
|
class {}:
|
|
|
|
{}
|
|
|
|
def protocolId(self):
|
|
return {}
|
|
|
|
@classmethod
|
|
def write(cls, buffer, packet):
|
|
if packet is None:
|
|
buffer.writeInt(0)
|
|
return
|
|
{}
|
|
pass
|
|
|
|
@classmethod
|
|
def read(cls, buffer):
|
|
length = buffer.readInt()
|
|
if length == 0:
|
|
return None
|
|
beforeReadIndex = buffer.getReadOffset()
|
|
packet = {}()
|
|
{}
|
|
if length > 0:
|
|
buffer.setReadOffset(beforeReadIndex + length)
|
|
return packet
|
|
|