public final class SipMessageDatagramDecoder
extends io.netty.handler.codec.MessageToMessageDecoder<io.netty.channel.socket.DatagramPacket>
SipMessageDatagramDecoder
will frame an incoming UDP packet into
a SipMessage
. Since the data will only be framed, only very minimal
checking of whether the data is actually a valid SIP message or not will be
performed. It is up to the user to validate the SipMessage through the method
SipMessage.verify()
. The philosophy is to simply just frame things as
fast as possible and then do lazy parsing as much as possible.Constructor and Description |
---|
SipMessageDatagramDecoder() |
SipMessageDatagramDecoder(Clock clock) |
Modifier and Type | Method and Description |
---|---|
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.socket.DatagramPacket msg,
java.util.List<java.lang.Object> out)
Framing an UDP packet is much simpler than for a stream based protocol
like TCP.
|
acceptInboundMessage, channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
handlerAdded, handlerRemoved, isSharable
public SipMessageDatagramDecoder()
public SipMessageDatagramDecoder(Clock clock)
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.socket.DatagramPacket msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
SipMessage.verify()
or the user
will eventually notice when trying to access partial headers etc.decode
in class io.netty.handler.codec.MessageToMessageDecoder<io.netty.channel.socket.DatagramPacket>
java.lang.Exception
Copyright © 2015. All Rights Reserved.