Oh, you're right! I thought I could get all the payload in that method. I just checked the Whisper code to know how to do it right. It seems I have to create a stream, and for every payload(byte[] data) write in it, so I can have the final result in the endBundle right? Just one more question, what the startBlock and endBlock methods for?

Really thanks,
Guilherme Rolim


On Tue, Sep 3, 2013 at 3:43 AM, Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de> wrote:
Are you really sure you get multiple bundles? Maybe you just misunderstood the API. Not every call of "public void payload(byte[] data);" represents one bundle. Rather, each bundle is received between a pair of beginBundle() and endBundle(). Between these calls the payload() method is called one or more times handover the payload of the bundle to your application. The amount of data here is limited by the internal data buffer.

Kind regards,
Johannes Morgenroth


Am 02.09.2013 18:49, schrieb Guilherme Rolim:

Hmm, that's strange. I'm sending a big String file containing a webpage. But I believe it's size is far inferior than 50MB. It's curious, because when I receive it, it seems like the String was to big for only one bundle, so I received other bundles with the rest of the same String. I'll try another method to send the bundle since the size shouldn't be a problem.

Thanks for the help,
Guilherme Rolim


--
!! This message is brought to you via the `ibr-dtn' mailing list.
!! Please do not reply to this message to unsubscribe. To unsubscribe or adjust
!! your settings, send a mail message to <ibr-dtn-request@ibr.cs.tu-bs.de>
!! or look at https://www.ibr.cs.tu-bs.de/mailman/listinfo/ibr-dtn.