Actions
Task #2793
closedpingserver: refactor for separate responsibility
Start date:
Due date:
% Done:
0%
Estimated time:
4.00 h
Description
Refactor ndnpingserver program to use the following structure:
           |------------|
   Face <- |            | -> Tracer
           | PingServer |
Options -> |
           |------------|
- An 
OptionsPOD struct contains parameters parsed from command line. PingServerclass constructor should takeFace&andOptionsas argument; getter/setter for each option are deleted from the class.PingServer::runreturns when expected number of Interests are processed (if a limit is specified inOptions).PingServerclass shouldn't write to stdout directly; instead, it emits a signal for each processed Interest.- A 
Tracerclass connects to the signals, and writes logs for each processed Interest. 
Benefits:
- separate responsibility: 
PingServerperforms network operations,Tracerwrites logs. - unit testing: passing DummyClientFace to 
Pingconstructor allows unit testing. - simulation: 
PingServercan be reused in a ndnSIM scenario. 
      
      Updated by Junxiao Shi over 10 years ago
      
    
    - Blocks Feature #2796: Tests for Ping and PingServer added
 
      
      Updated by Eric Newberry over 10 years ago
      
    
    - Status changed from New to Code review
 
      
      Updated by Alex Afanasyev over 10 years ago
      
    
    Junxiao, can you comment on http://gerrit.named-data.net/#/c/2024/ ?
      
      Updated by Eric Newberry over 10 years ago
      
    
    - Status changed from Code review to Closed
 
Actions