Search in sources :

Example 1 with LispMessageReader

use of org.onosproject.lisp.msg.protocols.LispMessageReader in project onos by opennetworkinglab.

the class LispMessageDecoder method decode.

@Override
protected void decode(ChannelHandlerContext ctx, DatagramPacket msg, List<Object> list) throws Exception {
    ByteBuf byteBuf = msg.content();
    LispMessageReader reader = LispMessageReaderFactory.getReader(byteBuf);
    LispMessage message = (LispMessage) reader.readFrom(byteBuf);
    message.configSender(msg.sender());
    list.add(message);
}
Also used : LispMessage(org.onosproject.lisp.msg.protocols.LispMessage) LispMessageReader(org.onosproject.lisp.msg.protocols.LispMessageReader) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

ByteBuf (io.netty.buffer.ByteBuf)1 LispMessage (org.onosproject.lisp.msg.protocols.LispMessage)1 LispMessageReader (org.onosproject.lisp.msg.protocols.LispMessageReader)1