On Tue, 2009-01-27 at 16:41 +0530, devesh wrote: > Hi all, > > I want to send a 2d array of 128X128 from one board to another using > RAW api. But it seems that connection goes down as i dont get ack. I > tried 32X32 , it works fine. Is there any buffer size in lwip? > > Again the problem is when i send 32X32 size after receiving ack , > connection gets closed so i am not able to do it with loop.any > suggestion?
You don't say what the size of each element in the array is, so I can't tell how much data you're sending. lwIP doesn't really care how your data is structured. It's just sending a stream of bytes, so it being an array shouldn't be relevant. >From the docs for tcp_write(): The tcp_write() function will fail and return ERR_MEM if the length of the data exceeds the current send buffer size or if the length of the queue of outgoing segment is larger than the upper limit defined in lwipopts.h. The number of bytes available in the output queue can be retrieved with the tcp_sndbuf() function. The proper way to use this function is to call the function with at most tcp_sndbuf() bytes of data. If the function returns ERR_MEM, the application should wait until some of the currently enqueued data has been successfully received by the other host and try again. Hope that helps Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
