Re: Socket recv() question?
- From: "Richard Plante" <richard.plante@xxxxxxxx>
- Date: Tue, 20 Feb 2007 10:05:52 -0500
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
PC.
Is there any other way to achieve this?
Please give me some ideas. Many thanks
.
- Follow-Ups:
- Re: Socket recv() question?
- From: Paul G. Tobey [eMVP]
- Re: Socket recv() question?
- References:
- Re: Socket recv() question?
- From: Richard Plante
- Re: Socket recv() question?
- Prev by Date: RE: CeDRM_Mgr_Initialize illegal operation (DRM)
- Next by Date: Re: Socket recv() question?
- Previous by thread: Re: Socket recv() question?
- Next by thread: Re: Socket recv() question?
- Index(es):
Relevant Pages
|
Loading