hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

buffer definition

Sat Jan 17, 2009 2:36 pm

Hi Jonas,

the buffer, I refere at stream.beginreading, is it just a dummy, or does it reserve memory? It seems not to be identical with the buffer, I find in the blueAsyncResult of the readcallback.

so, does the refered buffer need to be bigger than the incoming read or is it nonsense, or is it anything else?

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: buffer definition

Sat Jan 17, 2009 6:06 pm

A dummy? No, that's the buffer that the data is actually read into...?
At least I have always assume so.

Regards,
Jonas

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: buffer definition

Sat Jan 17, 2009 7:43 pm

oh yes, I think, you are right. So the blueresults.buffer is always upto the beginread buffer and only eliminates empty bytes. Is there a limit for the beginreadbuffer that should not be trespassed? 1000 bytes for instance?

regards

hajoko

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: buffer definition

Sat Jan 17, 2009 8:10 pm

Wrong topic, but does BT make an intern checksum control or is it necessary to build it myself?

regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: buffer definition

Mon Jan 19, 2009 1:42 am

The resulting buffer is cropped with the amount of data it has actually managed to read I guess, but can probably not be larger than your actual buffer is...

Checksum control of what?

Regards,
Jonas

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: buffer definition

Tue Jan 20, 2009 1:35 am

I suppose, BT has a checksum control onto a deeper layer and will repeat transfers in case of errors itself, so errors on layer of buffer content are of bare possibility and I dont need to build an own control?!

regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: buffer definition

Tue Jan 20, 2009 10:29 am

Yes, BlueTools transfer data over an ACL-link, which works like TCP. It will resend the data if there are errors on that layer.

Regards,
Jonas

Return to “BlueTools”