-
- All Implemented Interfaces:
-
java.io.Serializable
public class PeerUdpMessageEvent extends EventObject
The class is used to dispatch incoming UDP peer messages. Apart from the message itself one could also obtain the address from where the message is coming (used by a server implementation to determine the mapped address) as well as the Descriptor of the NetAccessPoint that received it (In case the stack is used on more than one ports/addresses).
-
-
Constructor Summary
Constructors Constructor Description PeerUdpMessageEvent(StunStack stunStack, RawMessage udpMessage)Initializes a new PeerUdpMessageEvent associated with a specific PeerUdp Message.
-
Method Summary
Modifier and Type Method Description StunStackgetStunStack()Gets the StunStack associated with this instance. Array<byte>getBytes()Returns the message itself. intgetMessageLength()Returns the message length. TransportAddressgetRemoteAddress()Returns the address and port of the host that sent the message TransportAddressgetLocalAddress()Returns the address that this message was received on. -
-
Constructor Detail
-
PeerUdpMessageEvent
PeerUdpMessageEvent(StunStack stunStack, RawMessage udpMessage)
Initializes a new PeerUdpMessageEvent associated with a specific PeerUdp Message.- Parameters:
stunStack- the StunStack to be associated with the new instance.udpMessage- the Peer UDP Message associated with the new event.
-
-
Method Detail
-
getStunStack
StunStack getStunStack()
Gets the StunStack associated with this instance.
-
getMessageLength
int getMessageLength()
Returns the message length.
-
getRemoteAddress
TransportAddress getRemoteAddress()
Returns the address and port of the host that sent the message
-
getLocalAddress
TransportAddress getLocalAddress()
Returns the address that this message was received on.
-
-
-
-