StreamPacket class created so that we can store all packets generically. The timestamp has also been extracted and stored with the packet so that in the future we may turn the current ArrayList into a priority que.

#story[817]
This commit is contained in:
Kusal Ekanayake
2017-04-23 20:14:41 +12:00
parent ba352183bf
commit 3dc1a7f9c0
3 changed files with 93 additions and 13 deletions
@@ -0,0 +1,21 @@
package seng302.models.parsers;
/**
* Created by kre39 on 23/04/17.
*/
public class StreamPacket {
//Change int to an ENUM for the type
private int type;
private long messageLength;
private long timeStamp;
private byte[] payload;
public StreamPacket(int type, long messageLength, long timeStamp, byte[] payload) {
this.type = type;
this.messageLength = messageLength;
this.timeStamp = timeStamp;
this.payload = payload;
}
}