# DataPacket

class DataPacket(var sequenceNumber: Int = 0, var packetPosition: PacketPosition = PacketPosition.SINGLE, var order: Boolean = false, var encryption: KeyBasedEncryption = KeyBasedEncryption.NONE, var retransmitted: Boolean = false, var messageNumber: Int = 0, var ts: Int = 0, var socketId: Int = 0, var payload: ByteArray = byteArrayOf()) : SrtPacket

Created by pedro on 21/8/23.

## Constructors

DataPacket
Link copied to clipboard
constructor(sequenceNumber: Int = 0, packetPosition: PacketPosition = PacketPosition.SINGLE, order: Boolean = false, encryption: KeyBasedEncryption = KeyBasedEncryption.NONE, retransmitted: Boolean = false, messageNumber: Int = 0, ts: Int = 0, socketId: Int = 0, payload: ByteArray = byteArrayOf())

## Properties

buffer
Link copied to clipboard
var buffer: ByteArrayOutputStream
encryption
Link copied to clipboard
var encryption: KeyBasedEncryption
messageNumber
Link copied to clipboard
var messageNumber: Int
order
Link copied to clipboard
var order: Boolean
packetPosition
Link copied to clipboard
var packetPosition: PacketPosition
payload
Link copied to clipboard
var payload: ByteArray
retransmitted
Link copied to clipboard
var retransmitted: Boolean
sequenceNumber
Link copied to clipboard
var sequenceNumber: Int
socketId
Link copied to clipboard
var socketId: Int
ts
Link copied to clipboard
var ts: Int

## Functions

getData
Link copied to clipboard
fun getData(): ByteArray
getSize
Link copied to clipboard
fun getSize(): Int
read
Link copied to clipboard
fun read(input: InputStream)
resetBuffer
Link copied to clipboard
fun resetBuffer()
toString
Link copied to clipboard
open override fun toString(): String
write
Link copied to clipboard
fun write()