summaryrefslogtreecommitdiff
path: root/packets/packet_chunk.gd
diff options
context:
space:
mode:
Diffstat (limited to 'packets/packet_chunk.gd')
-rw-r--r--packets/packet_chunk.gd9
1 files changed, 6 insertions, 3 deletions
diff --git a/packets/packet_chunk.gd b/packets/packet_chunk.gd
index 2bd8bc6..52981e6 100644
--- a/packets/packet_chunk.gd
+++ b/packets/packet_chunk.gd
@@ -1,10 +1,13 @@
class_name PacketChunk
-var byte_length: int:
+# set to 0 if variable length
+#const BYTE_LENGTH := 0
+
+var byte_length: int = 0:
get = get_byte_length
-## to be overriden
+## Override if packet has variable length.
func get_byte_length() -> int:
- return byte_length
+ return self.BYTE_LENGTH