Search in sources :

Example 1 with RawMessageAdapter

use of com.biglybt.pifimpl.local.network.RawMessageAdapter 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) };
}
Also used : RawMessageAdapter(com.biglybt.pifimpl.local.network.RawMessageAdapter) Message(com.biglybt.pif.messaging.Message) RawMessage(com.biglybt.pif.network.RawMessage) RawMessageAdapter(com.biglybt.pifimpl.local.network.RawMessageAdapter) RawMessage(com.biglybt.pif.network.RawMessage)

Aggregations

Message (com.biglybt.pif.messaging.Message)1 RawMessage (com.biglybt.pif.network.RawMessage)1 RawMessageAdapter (com.biglybt.pifimpl.local.network.RawMessageAdapter)1