Project

General

Profile

Actions

Feature #2500

closed

Face constructor with default transport and custom io service

Added by Alex Afanasyev about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Base
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

In some case, it may be necessary to use custom io_service, but default transport for Face constructor (KeyChain can be also custom).

Actions #1

Updated by Alex Afanasyev about 9 years ago

  • Project changed from NFD to ndn-cxx
  • Category set to Base
  • Target version set to v0.4
Actions #2

Updated by Junxiao Shi about 9 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.

Actions #3

Updated by Alex Afanasyev about 9 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.

Actions #4

Updated by Joao Pereira almost 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?

Actions #5

Updated by Junxiao Shi almost 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
Actions #6

Updated by Alex Afanasyev over 8 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".

Actions #7

Updated by Alex Afanasyev over 8 years ago

  • Status changed from New to Code review
  • Assignee set to Alex Afanasyev
  • % Done changed from 0 to 100
Actions #8

Updated by Alex Afanasyev over 8 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF