Class Envelope
java.lang.Object
com.jme3.network.kernel.Envelope
Encapsulates a received piece of data. This is used by the Kernel
to track incoming chunks of data.
- Author:
- Paul Speed
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Envelope
Creates an incoming envelope holding the data from the specified source. The 'reliable' flag further indicates on which mode of transport the data arrived.- Parameters:
source- the endpoint that produced the datadata- the received bytesreliable- true if the data arrived over a reliable transport
-
-
Method Details
-
getSource
Returns the endpoint that produced the data.- Returns:
- the source endpoint
-
getData
public byte[] getData()Returns the received bytes.- Returns:
- the received data
-
isReliable
public boolean isReliable()Returns whether the data arrived over a reliable transport.- Returns:
- true if the envelope is reliable
-
toString
-