Here is the code I am using if it helps:
#define DEF_RECEIVE_BUF 4096
len = WspGetReply(g->sock,g->inBuf,DEF_RECEIVE_BUF,maxTimer,g); // retreives
the WAP page
// a bunch of stuff to parse data
do { // this downloads the images. Images less than 1kb download fine but
anything larger fails with a timeout.
// on the simulator all images download fine.
len = WspGetReply(sock,imgBuf,DEF_RECEIVE_BUF,maxTimer,g);
}
while(len==0);
Int16 WspGetReply(Int16 sock, char *buf, Int16 buflen, UInt32
maxTimer,GlobalsType *g)
{
Int16 ret;
// please don't turn me off now
EvtResetAutoOffTimer();
for(;;) {
ret = recv(sock,buf,buflen,0);
if ((errno==netErrTimeout) && ( TimGetTicks() < maxTimer ) ) {
return(0);
}
if (ret <= 0) {
g->progress= 0;
showProgress(g);
g->state = BS_IDLE
if (ret == 0) {
MyErrorFunc2("Could not receive data from server. Connection closed
by remote host.","");
ret = -1;
}
MyErrorFunc2("\nCould not receive data from the
server.\nReason:\n",WspHostErrStr());
if (errno == ENOMEM) {
MyErrorFunc2("ENOMEM","");
}
} else {
g->state = BS_WSP_DECODE;
}
break;
}
// close socket if needed
if (sock >= 0)
close (sock);
sock = -1;
return(ret);
}
"Donald C. Kirker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> No, I am only using WSP. Receiving compiled wml sites an small WBMP's and
> JPEG's (under 1kb) works fine. But when I try to receive a 3kb jpeg
nothing
> comes through and I receive a timeout error.
>
> Thanks,
> Donald
>
> "Ben Combee" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > At 01:17 PM 9/18/2004, you wrote:
> > >So then if you read my post from above I can receive data under 1kb
just
> > >fine over UDP (WAP connectionless), but when the data becomes greater
> than
> > >1kb nothing gets returned. How could I fix it???
> >
> > Are you implementing WTP? That protocol, on top of WDS and WTLS,
provides
> > segmentation services that lets a single message be chunked into
multiple
> > packets. Since you're using a bearer protocol (UDP as WDP) that doesn't
> > provide segmentation, you need to do this at the higher level.
> >
> >
> > -- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc.
> > "Combee on Palm OS" weblog: http://palmos.combee.net/
> > Developer Fourm Archives: http://news.palmos.com/read/all_forums/
> >
> >
> >
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/