use of com.biglybt.pif.network.RawMessage in project BiglyBT by BiglySoftware.
the class MessageStreamEncoderAdapter method encodeMessage.
@Override
public com.biglybt.core.networkmanager.RawMessage[] encodeMessage(com.biglybt.core.peermanager.messaging.Message message) {
Message plug_msg;
if (message instanceof MessageAdapter) {
// original message created by plugin, unwrap
plug_msg = ((MessageAdapter) message).getPluginMessage();
} else {
// core created
plug_msg = new MessageAdapter(message);
}
RawMessage raw_plug = plug_encoder.encodeMessage(plug_msg);
return new com.biglybt.core.networkmanager.RawMessage[] { new RawMessageAdapter(raw_plug) };
}
Aggregations