openr66.protocol.networkhandler.packet
Class NetworkPacket
java.lang.Object
openr66.protocol.networkhandler.packet.NetworkPacket
public class NetworkPacket
- extends Object
Network Packet A Packet is composed of one global length field, two Id (4
bytes x 2) and a buffer. The first Id is the localId on receive operation and
the remoteId on send operation. The second Id is the reverse.
- Author:
- Frederic Bregier
NetworkPacket
public NetworkPacket(int localId,
int remoteId,
byte code,
org.jboss.netty.buffer.ChannelBuffer buffer)
- Parameters:
localId
- remoteId
- code
- buffer
-
NetworkPacket
public NetworkPacket(int localId,
int remoteId,
AbstractLocalPacket packet)
throws OpenR66ProtocolPacketException
- Parameters:
localId
- remoteId
- packet
-
- Throws:
OpenR66ProtocolPacketException
getBuffer
public org.jboss.netty.buffer.ChannelBuffer getBuffer()
- Returns:
- the buffer
getRemoteId
public int getRemoteId()
- Returns:
- the remoteId
getLocalId
public int getLocalId()
- Returns:
- the localId
getCode
public byte getCode()
- Returns:
- the code
getNetworkPacket
public org.jboss.netty.buffer.ChannelBuffer getNetworkPacket()
- Returns:
- The corresponding ChannelBuffer
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.