Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sending all data

4 views
Skip to first unread message

raashid bhatt

unread,
Jul 30, 2009, 6:06:55 AM7/30/09
to
My application connects to a HTTP server. And uploads a 2 mb file to
the server. but when i try to send the whole data i.e 2 mb send
returns -1;

please tell me any way i can send the whole data and what are the
limits in send() i mean how much buffer len it can send in one time

Peter Duniho

unread,
Jul 30, 2009, 2:01:20 PM7/30/09
to
On Thu, 30 Jul 2009 03:06:55 -0700, raashid bhatt <raashi...@gmail.com>
wrote:

You need to call GetLastError() to find out why your attempt to send
failed. AFAIK there's no requirement that all of the data passed to the
send() function be able to fit in a single buffer, so simply having a
large buffer passed to the function shouldn't be a problem. The function
should just block longer (assuming you're using blocking mode, of course).

Look at the actual error value, and that should give you some guidance as
to what you need to fix.

Also, consider providing an actual concise-but-complete code example so
that your question has context.

Pete

raashid bhatt

unread,
Jul 31, 2009, 3:38:17 AM7/31/09
to
On Jul 30, 11:01 am, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
> On Thu, 30 Jul 2009 03:06:55 -0700, raashid bhatt <raashidbh...@gmail.com>  

ya i am on blocking mode but still when sending large buffer over
network .. send returns -1

Jag

unread,
Aug 3, 2009, 12:07:26 PM8/3/09
to
Hi

> ya i am on blocking mode but still when sending large buffer over
> network .. send returns -1

Grab the last error using WSAGetLastError() after the send call.
That should point to something.

UNT,
Jag

0 new messages