◆ ~Portal()
| transport::interface::Portal::~Portal |
( |
| ) |
|
◆ bind()
| void transport::interface::Portal::bind |
( |
const BindConfig & |
config | ) |
|
Register a producer name to the local forwarder and optionally set the content store size in a per-face manner.
- Parameters
-
| config | - The configuration for the local forwarder binding. |
◆ clear()
| void transport::interface::Portal::clear |
( |
| ) |
|
Clear the pending interest hash table.
◆ connect()
| void transport::interface::Portal::connect |
( |
bool |
is_consumer = true | ) |
|
Connect the transport to the local hicn forwarder.
- Parameters
-
| is_consumer | - Boolean specifying if the application on top of portal is a consumer or a producer. |
◆ getIoService()
| asio::io_service& transport::interface::Portal::getIoService |
( |
| ) |
|
Get a reference to the io_service object.
◆ interestIsPending()
| bool transport::interface::Portal::interestIsPending |
( |
const core::Name & |
name | ) |
|
Check if there is already a pending interest for a given name.
- Parameters
-
◆ killConnection()
| void transport::interface::Portal::killConnection |
( |
| ) |
|
Disconnect the transport from the local forwarder.
◆ registerRoute()
| void transport::interface::Portal::registerRoute |
( |
core::Prefix & |
prefix | ) |
|
Register a route to the local forwarder.
◆ runOneEvent()
| void transport::interface::Portal::runOneEvent |
( |
| ) |
|
Run one event and return.
◆ sendContentObject()
Send a data packet to the local forwarder. As opposite to sendInterest, the ownership of the content object is not transferred to the portal.
- Parameters
-
| content_object | - The data packet. |
◆ sendInterest()
| void transport::interface::Portal::sendInterest |
( |
core::Interest::Ptr && |
interest, |
|
|
OnContentObjectCallback && |
on_content_object_callback = UNSET_CALLBACK, |
|
|
OnInterestTimeoutCallback && |
on_interest_timeout_callback = UNSET_CALLBACK |
|
) |
| |
Send an interest through to the local forwarder.
- Parameters
-
| interest | - The pointer to the interest. The ownership of the interest is transferred by the caller to portal. |
| on_content_object_callback | - If the caller wishes to use a different callback to be called for this interest, it can set this parameter. Otherwise ConsumerCallback::onContentObject will be used. |
| on_interest_timeout_callback | - If the caller wishes to use a different callback to be called for this interest, it can set this parameter. Otherwise ConsumerCallback::onTimeout will be used. |
◆ setConsumerCallback()
| void transport::interface::Portal::setConsumerCallback |
( |
ConsumerCallback * |
consumer_callback | ) |
|
Set the consumer callback.
- Parameters
-
◆ setProducerCallback()
| void transport::interface::Portal::setProducerCallback |
( |
ProducerCallback * |
producer_callback | ) |
|
Set the producer callback.
- Parameters
-
◆ stopEventsLoop()
| void transport::interface::Portal::stopEventsLoop |
( |
| ) |
|
Stop the event loop, canceling all the pending events in the event queue.
Beware that stopping the event loop DOES NOT disconnect the transport from the local forwarder, the connector underneath will stay connected.
The documentation for this class was generated from the following file:
- libtransport/includes/hicn/transport/interfaces/portal.h