Feature #3169
closed
  
        
        Added by Junxiao Shi about 10 years ago.
        Updated about 10 years ago.
        
  
  
  
  Description
  
  Implement WebSocketTransport for use with LinkService.
The WebSocketTransport is a subclass of Transport that communicates with a remote forwarder over a WebSocket.
WebSocketTransport is local if RemoteUri contains a loopback address; otherwise it's non-local. 
WebSocketTransport is always on-demand, because it's application connecting to NFD. There is no persistent or permanent WebSocketTransport. 
After implementing WebSocketTransport:
- change 
WebSocketChannel to initialize an LpFace(GenericLinkService+WebSocketTransport) in place of WebSocketFace 
- delete old 
WebSocketFace 
   
 
 
  
  
    
    
    
    
       - Blocked by Task #3088: Refactor Face as LinkService+Transport added
 
    
    
     
   
  
  
    
    
    
    
    Changes for this issue should be uploaded to feature-lp branch.
Most code can be adapted from old WebSocketFace.
Initialization logic is partially designed in #3088 note-20.
 
     
   
  
  
    
    
    
    
       - Description updated (diff)
 
    
    
     
   
  
  
    
    
    
    
       - Blocks Feature #3160: Permit scope=local in WebSocketTransport added
 
    
    
     
   
  
  
    
    
    
    
       - Blocks Task #3172: Refactor Face: completion added
 
    
    
     
   
  
  
    
    
    
    20151006 conference call decides: Change for this issue should be uploaded to master branch.
This is not a breaking change. No notice is needed.
 
     
   
  
  
    
    
    
    
       - Status changed from New to In Progress
 
    
    
     
   
  
  
    
    
    
    I may need some help about how to judge the loopback in WebSocket. Thanks!
 
     
   
  
  
    
    
    
    
       - Status changed from In Progress to Code review
 
       - % Done changed from 0 to 80
 
    
    
     
   
  
  
    
    
    
    Yukai Tu wrote:
I may need some help about how to judge the loopback in WebSocket. Thanks!
I think the safest way is to construct a boost::asio::ip::address from FaceUri and use is_loopback() interface.
 
     
   
  
  
    
    
    
    
       - Status changed from Code review to Closed
 
       - % Done changed from 80 to 100
 
    
    
     
   
  
 
  
  
 
Also available in:  Atom
  PDF