Package com.jme3.network.base.protocol
Class SerializerMessageProtocol
java.lang.Object
com.jme3.network.base.protocol.SerializerMessageProtocol
- All Implemented Interfaces:
- MessageProtocol
Implements a MessageProtocol providing message serializer/deserialization
  based on the built-in Serializer code. 
  
The protocol is based on a simple length + data format where two bytes represent the (short) length of the data and the rest is the raw data for the Serializers class.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiontoByteBuffer(Message message, ByteBuffer target) Converts a message to a ByteBuffer using the com.jme3.network.serializing.Serializer and the (short length) + data protocol.toMessage(ByteBuffer bytes) Creates and returns a message from the properly sized byte buffer using com.jme3.network.serializing.Serializer.
- 
Constructor Details- 
SerializerMessageProtocolpublic SerializerMessageProtocol()
 
- 
- 
Method Details- 
toByteBufferConverts a message to a ByteBuffer using the com.jme3.network.serializing.Serializer and the (short length) + data protocol. If target is null then a 32k byte buffer will be created and filled.- Specified by:
- toByteBufferin interface- MessageProtocol
 
- 
toMessageCreates and returns a message from the properly sized byte buffer using com.jme3.network.serializing.Serializer.- Specified by:
- toMessagein interface- MessageProtocol
 
- 
createBuffer- Specified by:
- createBufferin interface- MessageProtocol
 
 
-