public interface TransportPacketFactory
| Modifier and Type | Method and Description |
|---|---|
TransportPacket |
create(Protocol protocol,
byte[] srcAddress,
int srcPort,
byte[] destAddress,
int destPort,
Buffer payload)
Create a new
TransportPacket. |
TransportPacket |
create(Protocol protocol,
String srcAddress,
int srcPort,
String destAddress,
int destPort,
Buffer payload)
Create a new
TransportPacket. |
UDPPacket |
createUDP(Buffer payload) |
UDPPacket |
createUDP(long ts,
Buffer payload)
Create a
UDPPacket with the specified payload and with the
following default values:
MAC Src Address: 00:00:00:00:00:00
MAC Dst Address: 00:00:00:00:00:00
IP Src Address: 127.0.0.1
IP Dst Address: 127.0.0.1
UDP Src Port: 0
UDP Dst Port: 0
|
TransportPacket create(Protocol protocol, String srcAddress, int srcPort, String destAddress, int destPort, Buffer payload) throws IllegalArgumentException, IllegalProtocolException
TransportPacket.protocol - which protocol, currently only Protocol.UDP and
Protocol.TCP are supportedsrcAddress - the source address.srcPort - the source portdestAddress - the destination addressdestPort - the destination portpayload - the payload or null if noneTransportPacketIllegalArgumentException{@link - IllegalProtocolException} in case any other protocol but
Protocol.UDP or Protocol.TCP was specified.IllegalProtocolExceptionTransportPacket create(Protocol protocol, byte[] srcAddress, int srcPort, byte[] destAddress, int destPort, Buffer payload) throws IllegalArgumentException, IllegalProtocolException
TransportPacket.protocol - which protocol, currently only Protocol.UDP and
Protocol.TCP are supportedsrcAddress - the source address.srcPort - the source portdestAddress - the destination addressdestPort - the destination portpayload - the payload or null if noneTransportPacketIllegalArgumentException{@link - IllegalProtocolException} in case any other protocol but
Protocol.UDP or Protocol.TCP was specified.IllegalProtocolExceptionUDPPacket createUDP(long ts, Buffer payload) throws IllegalArgumentException, IllegalProtocolException
UDPPacket with the specified payload and with the
following default values:
payload - IllegalArgumentExceptionIllegalProtocolExceptionUDPPacket createUDP(Buffer payload) throws IllegalArgumentException, IllegalProtocolException
payload - IllegalArgumentExceptionIllegalProtocolExceptionCopyright © 2021. All Rights Reserved.