Feature #2500
closedFace constructor with default transport and custom io service
100%
Description
In some case, it may be necessary to use custom io_service
, but default transport for Face constructor (KeyChain can be also custom).
Updated by Alex Afanasyev almost 10 years ago
- Project changed from NFD to ndn-cxx
- Category set to Base
- Target version set to v0.4
Updated by Junxiao Shi almost 10 years ago
Please be explicit about the use case.
When I added Face(shared_ptr<Transport> transport, boost::asio::io_service& ioService, KeyChain& keyChain);
overload, it was decided that this overload allows all customization and no other overload is needed.
Updated by Alex Afanasyev almost 10 years ago
Until the use case arises, there is no way to know what exactly is needed. I got the issue when attempting to create face inside refactored NRD with customized keychain (this part will be needed for ndnSIM).
So, the use case is that application may want to have two faces (for some unspecified reason) and wants to shared the same io_service
, while using customized KeyChain. The current constructor allows that, but it requires explicitly creating transport, while some applications may want to use whatever is default.
Updated by Joao Pereira over 9 years ago
Do you prefer to add a new constructor with
Face( boost::asio::io_service& ioService,
KeyChain& keyChain);
Or prefer to use the one from Note#2 and check if transport is nullptr?
Updated by Junxiao Shi over 9 years ago
- Tracker changed from Task to Feature
- Subject changed from Face missing constructor with default transport and custom io service to Face constructor with default transport and custom io service
Updated by Alex Afanasyev almost 9 years ago
Face(shared_ptr<Transport> transport, boost::asio::io_service& ioService, KeyChain& keyChain)
could be sufficient, provided that nullptr for the first parameter is treated as "use default transport".
Updated by Alex Afanasyev almost 9 years ago
- Status changed from New to Code review
- Assignee set to Alex Afanasyev
- % Done changed from 0 to 100
Updated by Alex Afanasyev almost 9 years ago
- Status changed from Code review to Closed