lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] netbuf_data() netconnwrite() problem


From: Kieran Mansley
Subject: Re: [lwip-users] netbuf_data() netconnwrite() problem
Date: Tue, 17 Feb 2009 11:39:13 +0000

On Mon, 2009-02-16 at 14:42 -0500, Francois Bouchard wrote:
> This code works for a string ie. it sends exactly the same thing.  But for
> ushorts I can't manage them.  Maybe I'll stick to strings ... and change the
> client test program.

How is the client sending the ushorts?  If it does, for example, 10
separate writes, you might receive them as 10 separate receives.  This
might explain why a string works and the ushorts don't as I'd expect the
client to send the string in a single write.  Of course if you're using
TCP the network stack is free to segment and combine application writes
into whatever blocks it likes, so you can't assume that you'll receive
the data in the same blocks it was sent in.

The other thing that makes me slightly nervous is the use of
NETCONN_NOCOPY.  How/when are you freeing inbuf?

Thanks

Kieran





reply via email to

[Prev in Thread] Current Thread [Next in Thread]