Hello Farouk,
the best way to achieve what you explained depends on your intention.
One way would be to start the daemon in debug mode with a level of at
least 70 and watch out for "MSG_DATA_SEGMENT received". This indicates
an ongoing transfer. It does not tell you if the bundle will be accepted
by the daemon or if the data is being received by a TCP-CL or the API.
If you plan to measure performance this way, you'll have to consider
that debug output will slow down the overall performance of the daemon.
If you plan to implement some feature within the daemon, you could
integrate some indicator within the function:
void BundleCore::validate(const dtn::data::PrimaryBlock &p)
This function is called on every bundle processed by the daemon as soon
as the primary bundle header is available. Be aware that this is not
only the case if a bundle is received by the API or a convergence-layer.
This function is also called if a bundle is restored from a file within
the storage.
I hope this information is useful for you.
Kind regards,
Johannes
Am 18.04.2015 um 15:11 schrieb Mathias Brulatout:
> @Sebastian : When a bundle is received, a BundleReceivedEvent is raised
> by the TCPConnection (if the two nodes communicate with TCP). Farouk
> wants to know when a bundle is being received.
> @Farouk : what do you want to do with this information ?
--
!! 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://mail.ibr.cs.tu-bs.de/listinfo/ibr-dtn.