Commit a1bcc377 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Don't hard code response bitmask.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1670 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e7ddd2df
......@@ -27,6 +27,7 @@ PROTOCOL_VERSION = (4, 0)
MIN_PACKET_SIZE = 10
MAX_PACKET_SIZE = 0x4000000
PACKET_HEADER_SIZE = 10
RESPONSE_MASK = 0x8000
class ErrorCodes(Enum):
ACK = Enum.Item(0)
......@@ -277,7 +278,7 @@ class Packet(object):
return ()
def isResponse(self):
return self._code & 0x8000 == 0x8000
return self._code & RESPONSE_MASK == RESPONSE_MASK
class Ping(Packet):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment