LimeWire Consolidated API

org.limewire.rudp.messages
Interface RUDPMessage

All Known Subinterfaces:
AckMessage, DataMessage, FinMessage, KeepAliveMessage, SynMessage
All Known Implementing Classes:
AbstractLimeRUDPMessage, RUDPMessageImpl, SynMessageImpl

public interface RUDPMessage

Defines the interface in which all RUDP messages derive.


Nested Class Summary
static class RUDPMessage.OpCode
          Used to specify a message type (either SYN, ACK, KEEPALIVE, DATA or FIN).
 
Field Summary
static byte F_RUDP_MESSAGE
          The main functor of an RUDP message.
static short PROTOCOL_VERSION_NUMBER
           
 
Method Summary
 void extendSequenceNumber(long seqNo)
          Extend the sequence number of incoming messages with the full 8 bytes of state
 byte getConnectionID()
          Return the messages connectionID identifier.
 int getDataLength()
          Return the length of data stored in this message.
 int getLength()
          Returns the length of the message.
 RUDPMessage.OpCode getOpCode()
          Gets the OpCode for the message.
 long getSequenceNumber()
          Return the messages sequence number
 void write(OutputStream out)
          Writes the message to the OutputStream.
 

Field Detail

F_RUDP_MESSAGE

static final byte F_RUDP_MESSAGE
The main functor of an RUDP message.

See Also:
Constant Field Values

PROTOCOL_VERSION_NUMBER

static final short PROTOCOL_VERSION_NUMBER
See Also:
Constant Field Values
Method Detail

getOpCode

RUDPMessage.OpCode getOpCode()
Gets the OpCode for the message.


write

void write(OutputStream out)
           throws IOException
Writes the message to the OutputStream.

Throws:
IOException

getConnectionID

byte getConnectionID()
Return the messages connectionID identifier.


getSequenceNumber

long getSequenceNumber()
Return the messages sequence number


extendSequenceNumber

void extendSequenceNumber(long seqNo)
Extend the sequence number of incoming messages with the full 8 bytes of state


getDataLength

int getDataLength()
Return the length of data stored in this message.


getLength

int getLength()
Returns the length of the message.


LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.