public class DTLSDatagramFilter extends Object implements DatagramPacketFilter
DatagramPacketFilter
which accepts DTLS packets only.Constructor and Description |
---|
DTLSDatagramFilter() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(DatagramPacket p)
Determines whether a specific DatagramPacket is accepted by this
filter i.e.
|
static boolean |
isDTLS(byte[] data,
int off,
int len)
Determines whether the buffer represented by
data , off
and len looks like a DTLS packet. |
static boolean |
isDTLS(DatagramPacket p)
Determines whether
p looks like a DTLS packet. |
public static boolean isDTLS(DatagramPacket p)
p
looks like a DTLS packet.p
- the DatagramPacket
to check.true
if p
looks like a DTLS packet; otherwise,
false
.public static boolean isDTLS(byte[] data, int off, int len)
data
, off
and len
looks like a DTLS packet.data
- the array that contains the data.off
- the offset.len
- the length.true
if the buffer looks like a DTLS packet; otherwise,
false
.public boolean accept(DatagramPacket p)
accept
in interface DatagramPacketFilter
p
- the DatagramPacket which is to be checked whether it is
accepted by this filterCopyright © 2018. All rights reserved.