This section provides two examples of MIDlets that are launched in response to a network notification. The first example is a Chat application that uses a well-known port for communication. The second example is a Ping application that dynamically allocates a port the first time it is started.
The Chat application uses push to receive a message on a well-known port. In order to concentrate on the push functionality, it does not show any corresponding MIDlet that would enable the user to reply to the message.
This sample is appropriate for bursts of datagrams because it loops on the connection, processing received messages.
The JAD file for the Chat application's MIDlet suite includes ...