Re: Socket recv() question?



There's a limited amount of RAM in CE devices. You can't use virtual memory
and RAM is limited. It's only going to return you a relatively small
amount. For that matter, I seriously doubt that the PC is sending that data
in a single packet, either. On the send end, the PC can buffer up a huge
amount of data and send it in manageable pieces; you can't reasonably do
that on the Pocket PC.

Paul T.

"Richard Plante" <richard.plante@xxxxxxxx> wrote in message
news:%23mHteCQVHHA.868@xxxxxxxxxxxxxxxxxxxxxxx
0) Assuming the following variables

SOCKET s;
timeval timeout;

1) First, create a descriptor

fd_set fd;

2) Initialize it

fd.fd_array[0] = s;
fd.fd_count = 1;

3) Configure tx timeout

select(0, NULL, &fd, NULL, &timeout);

4) Configure rx timeout

select(0, &fd, NULL, NULL, &timeout);


"Vin" <Vin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:001E0DB9-956B-4E2A-B5D9-AB1F49C213DC@xxxxxxxxxxxxxxxx
Hi Thanks for the advice.

Yes I looked at the return code and it was normal. The most data that I
can
receive it 32kb that's all. Is there something I am doing wrong?

by the way, how do you use the select to change the time out? I have
never
done it before. Can you send me more info on this or a code snippet?

thanks

"Richard Plante" wrote:

Did you look at the return code when exiting your loop that omnly
retrieves
32Kb of data? It could be a timeout problem; in that case I would
consider
increasing the timeout using the select method on the socket descriptor.

"Vin" <Vin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1E552903-CD74-485D-8293-C117D7255E39@xxxxxxxxxxxxxxxx
Sorry, I am using Embedded visual c++ 4.0 ( NOT ce 3.0)

thanks

"Vin" wrote:

Hi,

I am developing an application using Embedded visual c++ (wince 3.0)
using
sockets to send binary data from a pc to Pocket PC.

The PC is set to send 1.4mb through the socket, but the Pocket PC is
only
receive 32kb at a time within the while loop

for example:
while(moreData)
{
moreData = recv(s, buf, len, 0);
}

OK, is there anything I can do to improve this 32kb of data on the
socket?
Why so low? Is it possible to increase it from 32kb to at least 1mb?

I am trying to transfer some data at least 1.5 mb from the PC to the
Pocket
PC.

Is there any other way to achieve this?

Please give me some ideas. Many thanks







.



Relevant Pages

  • Re: Socket recv() question?
    ... You might be doing something crazy, writing the data to the file one byte ... socket function correctly? ... The PC would send the data and Pocket PC would receive it. ... Configure tx timeout ...
    (microsoft.public.windowsce.app.development)
  • Re: Socket recv() question?
    ... You might be doing something crazy, writing the data to the file one byte at ... socket function correctly? ... How come when I use the IE on the Pocket PC and started IIS on my PC. ... Configure tx timeout ...
    (microsoft.public.windowsce.app.development)
  • Re: Socket recv() question?
    ... You might be doing something crazy, writing the data to the file one byte at ... socket function correctly? ... How come when I use the IE on the Pocket PC and started IIS on my PC. ... Configure tx timeout ...
    (microsoft.public.windowsce.app.development)
  • Re: Socket recv() question?
    ... How come when I use the IE on the Pocket PC and started IIS on my PC. ... in a single packet, either. ... SOCKET s; ... Configure tx timeout ...
    (microsoft.public.windowsce.app.development)
  • Re: read-sequence from socket
    ... | I'm trying to read into a buffer from a socket using `read-sequence'. ... You're going to find that doing this with READ-SEQUENCE is likely ... the timeout exception occurs in the middle of a read the "amount ... you'll have a deterministic count of "amount ...
    (comp.lang.lisp)