<P>The example application opens a <strong>UDP</strong> connection at the port 777. Any UDP packets sent to that connection are interpreted as text to display on the LCD. The application responds back to the sender with a UDP packet that contains the original text plus the prepened sequence number. Obviously, the simple text format is used for simplicity. In real-life applications binary format could be more efficient.
<P>To facilitate testing of UDP connectivity, a simple console application called <CODE>qudp</CODE> for Windows or Linux hosts is provided in the <strong>QP-lwIP</strong> example code. The following listing shows an example output generated from the <CODE>qudp</CODE> applicaiton:
Type command(s); press Enter to send command, ESC to quit
Hello
Sending: "Hello"
Received: "Hello-1"
How are
Sending: "How are"
Received: "How are-2"
you?
Sending: "you?"
Received: "you?-3"
Done.
</pre>
<P>Please refer to the Quantum Leaps Application Note: <AHREF="http://www.state-machine.com/lwip/AN_QP_and_lwIP.pdf"TARGET="_blank">"QP and lwIP TCP/IP Stack"</A> for more information. The Application Note in PDF is provided in the <strong>QP-lwIP</strong> example code.