http://asynclabs.com/forums/viewtopic.php?f=15&t=18&start=20
fdarvas would like to create a WiShield app that that opens a socket that essentially streams sensor data via that socket to a remote client. In looking at the sample apps I am seeing that they are "hit and run" - meaning that the server apps will listen on a port and either send one chunk of data and close the socket or only send data in response to received data. After reviewing the uIP documents my understanding is that data can only be transmitted in response to the stack calling your UIP_APPCALL function - and the recommended way to accomplish this is via paying attention to uip_poll() (or its variants). My experimentation shows this to be true (I cannot send using uip_send() from my application loop() but can uip_send() in response to a poll event in UIP_APPCALL).
From the uIP doc
1.6.1.8 Polling
...
The polling event has two purposes.
...
The other purpose is to let the application send new data that has been produced. The application can only send data when
invoked by uIP, and therefore the poll event is the only way to send data on an otherwise idle connection.
Am I understanding correctly that an app that wants to stream data over a socket must queue up its data and send it in response to a poll (or other) UIP_APPCALL event?
Also, how does breemen's distribution of his Client/Server code (from above thread) differ from the official WiShield distribution? It appears to be a superset with some added functionality?
Thanks!
Greg