AFAIK, this is true on any system. You should never assume that send (in this case, NetLibSend) writes all information to the socket. For non-blocking I/O, the return value of send does not indicate that the remote host actually received the information, only whether it could be written to an internal buffer.
You'll have to write a simple loop to write your entire POST to the socket. This could be encapsulated in a SendFully() method. -- Andr� -----Original Message----- From: Ralph Rostock [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 1:32 PM To: Palm Developer Forum Subject: Re: 4K Limit on NetLibSend using device (not emulator)?? Well, I'm doing an HTTP POST in this socket write, so I'd really like to get all my data to the server with one write rather than having to do multiple writes. I'm really surprised this doesn't work and isn't documented anywhere. "Aaron Ardiri" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > I have run into a problem where a NetLibSend (actually I'm using the > > equivalent sockets "write" function) never writes more than 4K of > > data to the socket Anything up to 4K is fine, but anything over 4K > > returns 4096 as the number of bytes sent, > > and the server only receives the first 4K. The socket was > > created using the netSocketTypeStream option. This does not happen > > on the emulator, presumably because the Windows network stack is > > being used as opposed to the PalmOS one. I have searched all the > > documentation I can find but can't find anything regarding this - it > > seems like someone would've run into this before.... Any help would > > be greatly appreciated. > > is there anything wrong with sending 4k at a time? > > being a mobile platform where bandwidth is an issue, and, timeouts > happen quite a bit - it probably doesn't hurt to programmatically > handle your data in 4k chunks. > > it may also be relevant to the 'file streaming' API's - which also has > a 4k limit - never looked into the issue that deep to give you a > precise/exact answer. > > --- > Aaron Ardiri [EMAIL PROTECTED] > CEO - CTO +46 70 656 1143 > Mobile Wizardry http://www.mobilewizardry.com/ > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
