Don't use s->inputbuffer to receive data - its only 20 bytes; use your own buffer and pass in its (larger) size to PSOCK_INIT (or make the s->inputbuffer larger - it lives in socketapp.h). Or better yet don't use PSOCK_INIT at all unless you really need it (see the uIP reference docs) and reference uip_appdata directly.
- Code: Select all
// a new global
#define RECVBUFFSIZE 200
char recvBuff[RECVBUFFSIZE];
//in socketapp.c -> socket_app_appcall()
/*
* If a new connection was just established, we should initialize
* the protosocket in our applications' state structure.
*/
if(uip_connected()) {
PSOCK_INIT(&s->p, recvBuff, sizeof(recvBuff));
}