-
New Feature
-
Resolution: Done
-
Medium
-
None
-
None
Transport protocol internals are currently hidden inside libtransport, which is designed to provide a high level interface to application (Consume/Produce contents). However, some applications may want to just use the protocol internals and send/receive interests/data independently by their own (host-stack).
This feature will allow applications to get an instance of the transport protocol algorithm, and query it to adjust the size of the window accordingly.
The interface will be the following:
class TransportAlgorithm { public: virtual ~TransportAlgorithm() = default; virtual void reset() = 0; virtual uint32_t onContentObject(uint32_t suffix, uint32_t path_label) = 0; virtual uint32_t onInterestTimeout(uint32_t suffix) = 0; virtual void onInterestSent(uint32_t suffix) = 0; virtual void sessionEnd() = 0; };
The 2 main methods are onContentObject and onInterestTimeout, and they return the new size of the window after the corresponding event happened.
The interface is also available in C.
extern "C" uint32_t transportAlgorithm_OnContentObject( TransportAlgorithm *algorithm, uint32_t suffix, uint32_t path_label); extern "C" uint32_t transportAlgorithm_OnInterestTimeout( TransportAlgorithm *algorithm, uint32_t suffix); ...