Added `getTag()` and `getData()` and made instance variables private

This commit is contained in:
Tristan B. Kildaire 2020-09-29 19:18:45 +02:00
parent 24d56c93a9
commit 96e755d3cc
1 changed files with 12 additions and 2 deletions

View File

@ -3,8 +3,8 @@ module tristanable.encoding;
public final class DataMessage
{
public ulong tag;
public byte[] data;
private ulong tag;
private byte[] data;
public static DataMessage decode(byte[] bytes)
{
@ -43,4 +43,14 @@ public final class DataMessage
return messageData;
}
public byte[] getData()
{
return data;
}
public ulong getTag()
{
return tag;
}
}