Product of NIST/ITL Advanced Networking Technologies Division (ANTD). *
Sit in a loop and handle incoming udp datagram messages. For each Datagram
packet, a new UDPMessageChannel is created (upto the max thread pool size).
Each UDP message is processed in its own thread).
- M. Ranganathan
See the implementation sequence diagram for processing incoming requests.
Acknowledgement: Jeff Keyser contributed ideas on starting and stoppping the
stack that were incorporated into this code. Niklas Uhrberg suggested that
thread pooling be added to limit the number of threads and improve
- 1.2 $Revision: 188.8.131.52 $ $Date: 2010-12-02 01:41:35 $
The Mapped port (in case STUN suport is enabled)
Incoming messages are queued here.
A list of message channels that we have started.
Max # of udp message channels
A flag that is set to false to exit the message processor (suggestion by
private static final int HIGHWAT=5000;
private static final int LOWAT=2500;
pointer to the stack.
super(ipAddress, port, "udp",sipStack);
If the thread auditor is enabled, define a socket timeout value in order to
prevent sock.receive() from blocking forever
Get port on which to listen for incoming stuff.
- port on which I am listening.
Start our processor thread.
byte message = new byte[bufsize];
.logDebug("UDPMessageProcessor: Got an IO Exception");
.logDebug("UDPMessageProcessor: Unexpected Exception - quitting");
Shut down the message processor. Close the socket for recieving incoming
Return the transport string.
- the transport string
Create and return new TCPMessageChannel for the given host/port.
Default target port for UDP
UDP is not a secure protocol.
UDP can handle a message as large as the MAX_DATAGRAM_SIZE.
Return true if there are any messages in use.