public interface DatagramProcessor
An implementation of this interface has to be thread-safe.
| Modifier and Type | Method and Description |
|---|---|
IncomingDatagramMessage |
read(InetAddress receivedOnAddress,
DatagramPacket datagram)
Reads the datagram and instantiates a message.
|
DatagramPacket |
write(OutgoingDatagramMessage message)
Creates a UDP datagram with the content of a message.
|
IncomingDatagramMessage read(InetAddress receivedOnAddress, DatagramPacket datagram) throws UnsupportedDataException
The message is either a UpnpRequest or
a UpnpResponse operation type.
receivedOnAddress - The address of the socket on which this datagram was received.datagram - The received UDP datagram.UnsupportedDataException - If the datagram could not be read, or didn't contain required data.DatagramPacket write(OutgoingDatagramMessage message) throws UnsupportedDataException
The outgoing message might be a UpnpRequest or a
UpnpResponse.
message - The outgoing datagram message.UnsupportedDataException - If the datagram could not be created.Copyright © 2023 jUPnP.org. All rights reserved.