public class DatagramSequencer extends Object
| Constructor and Description |
|---|
DatagramSequencer(UnreliableObjectInputStream uin,
UnreliableObjectOutputStream uout)
Creates a new sequencer that will read and write from the specified streams.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMissedCount()
Returns the number of datagrams missed between the last and the one before it.
|
Message |
readDatagram()
Reads a datagram from the underlying stream.
|
void |
writeDatagram(Message datagram)
Writes a datagram to the underlying stream.
|
public DatagramSequencer(UnreliableObjectInputStream uin, UnreliableObjectOutputStream uout)
public void writeDatagram(Message datagram) throws IOException
IOExceptionpublic Message readDatagram() throws IOException, ClassNotFoundException
null if the datagram was received
out-of-order.IOExceptionClassNotFoundExceptionpublic int getMissedCount()
Copyright © 2015. All rights reserved.