Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Symbian > Re: RecvOneOrMo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 95 of 155
Post > Topic >>

Re: RecvOneOrMore unknown error

by "Lucian Tomuta" <tomutal@[EMAIL PROTECTED] > Oct 13, 2004 at 03:09 PM

My suggestion to you would be to use active objects with asynchronous
operations. I cannot understand why some people insist on putting the
thread
to sleep while waiting for some asynchronous method to complete...

Lucian

"MW Ron" <mwron@[EMAIL PROTECTED]
> wrote in message
news:mwron-BDB7DD.15090901102004@[EMAIL PROTECTED]
> In article <ebeef0a2.0409230201.c6a1f6@[EMAIL PROTECTED]
>,
>  cris_miron@[EMAIL PROTECTED]
 (Cristian Miron) wrote:
>
> Hi Cristian,
>
> I'm sorry but I could not come up with any answer.  Metrowerks does not
> support programming questions,  you need to take those to Symbian.  You
> might try NewLC  http://www.newlc.com/
 they have programmers forums.
>
> Ron
>
>
> >   I am trying to communicate using Bluetooth. When I try to receive a
> >large block of data (~40K) using RecvOneOrMore function from my
> >emulator (with epoc and BH4-X driver for USB adapters) in a loop (to
> >get all the data, pieces by pieces), after 2-5 loops, I get this
> >TRequestStatus.Int() value : 0x80000001 ( != KErrUnknown or any other
> >KErrxxxxx system wide error).
> >   This is my code:
> >
> > //..
> >
> > int bytes_received = 0;
> >
> > while(bytes_received < size)
> > {
> > iSocket.RecvOneOrMore(str, 0, iStatus, aLen);
> > User::WaitForRequest(ilStatus);
> >
> > int len = str.Length();
> >
> > if(!IsActive())
> > SetActive();
> >
> > switch(iStatus.Int())
> > {
> > case KErrNone:
> > break;
> > // .
> > case KErrUnknown:
> > iConnected = false; break;
> > // .
> > default:
> > iConnected = false; break;  // iStatus.Int() = 0x80000001 !!!
> > }
> >
> > if (ilStatus == KErrEof)
> > {
> > iConnected = EFalse;
> > return NULL;
> > }
> >
> > for (int i = 0; i < len; i++)
> > buffer[bytes_received + i] = (char)str[i];
> >
> > bytes_received += len;
> >
> > str.Zero();
> > }
> >
> >What is the problem here?
> >
> >Thank you.
> >
> >
> >Cristian Miron
>
> -- 
> Metrowerks Community Forum is a free online resource for developers
> to discuss CodeWarrior topics with other users and Metrowerks' staff
>         --   http://www.metrowerks.com/community
 --
>
>  Ron Liechty - MWRon@[EMAIL PROTECTED]
 - http://www.metrowerks.com




 4 Posts in Topic:
RecvOneOrMore unknown error
cris_miron@[EMAIL PROTECT  2004-09-23 03:01:28 
Re: RecvOneOrMore unknown error
MW Ron <mwron@[EMAIL P  2004-10-01 15:09:09 
Re: RecvOneOrMore unknown error
"Lucian Tomuta"  2004-10-13 15:09:05 
Re: RecvOneOrMore unknown error
cris_miron@[EMAIL PROTECT  2004-10-21 04:01:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 2:18:49 CDT 2008.