Project

General

Profile

Actions

Feature #3165

closed

UnixStreamTransport

Added by Junxiao Shi over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Faces
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
1.00 h

Description

Implement UnixStreamTransport for use with LinkService.

The UnixStreamTransport is a subclass of Transport that communicates with a local application via a UNIX stream socket.

  • UnixStreamTransport is always local.
  • UnixStreamTransport is always on-demand, because it's application connecting to NFD. There is no persistent or permanent UnixStreamTransport.

After implementing UnixStreamTransport:

  • change UnixStreamChannel to initialize an LpFace(GenericLinkService+UnixStreamTransport) in place of UnixStreamFace
  • delete old UnixStreamFace

Related issues 6 (1 open5 closed)

Related to NFD - Feature #3166: TcpTransportClosedYukai Tu

Actions
Related to NFD - Feature #1672: UnixSeqPacketTransportNew

Actions
Related to ndn-cxx - Feature #2930: Face: send and receive NACKClosedEric Newberry

Actions
Blocked by NFD - Task #3088: Refactor Face as LinkService+TransportClosedEric Newberry

Actions
Blocks NFD - Task #3172: Refactor Face: completionClosedJunxiao Shi

Actions
Blocks NFD - Task #3305: UnixStreamTransport: test suite improvementClosedEric Newberry

Actions
Actions #1

Updated by Junxiao Shi over 8 years ago

  • Blocked by Task #3088: Refactor Face as LinkService+Transport added
Actions #2

Updated by Junxiao Shi over 8 years ago

Actions #3

Updated by Junxiao Shi over 8 years ago

  • Assignee set to Yukai Tu

Changes for this issue should be uploaded to feature-lp branch.

Most code can be adapted from old UnixStreamFace.

Initialization logic is partially designed in #3088 note-20.

The assignee may decide whether to have a StreamTransport template that is shared between UnixStreamTransport and TcpTransport, or to implement them separately.

Actions #4

Updated by Davide Pesavento over 8 years ago

Actions #5

Updated by Junxiao Shi over 8 years ago

  • Description updated (diff)
Actions #6

Updated by Junxiao Shi over 8 years ago

  • Blocks Task #3172: Refactor Face: completion added
Actions #7

Updated by Junxiao Shi over 8 years ago

Actions #8

Updated by Yukai Tu over 8 years ago

  • Status changed from New to In Progress
  • Estimated time changed from 3.00 h to 1.00 h
Actions #9

Updated by Yukai Tu over 8 years ago

I prefer to have a StreamTransport template since it is shared between UnixStreamTransport and TcpTransport, reducing the code redundacy.

Actions #10

Updated by Davide Pesavento over 8 years ago

I agree.

Actions #11

Updated by Yukai Tu over 8 years ago

I would like to use FaceUri in UnixStreamTransport consturctor, it seems that in UnixStreamChannel I can't get access to endpoint.

And How can I deal with StreamFace::deferredClose()?

Thanks!

Actions #12

Updated by Yukai Tu over 8 years ago

  • Status changed from In Progress to Code review
Actions #13

Updated by Yukai Tu over 8 years ago

There is an error, occurs at unix-stream.t.cpp line410, which may cause the loop. And it will evoke the StreamTransport::processErrorCode. I have checked that the error maybe a null point and it will cause the socket shutdown(StreamTransport::processErrorCode, line 171). Do you know how can I solve that?

Thanks!

Actions #14

Updated by Davide Pesavento over 8 years ago

IIUC the local control header features are not supported by the new LpFace (yet), so I guess the whole UnixStreamFaceLocalControlHeader test case should be commented out for now.

Actions #15

Updated by Yukai Tu over 8 years ago

@Davide

May I comment CorruptedInput test too? Since it also a test about LocalControlHeader and it causes error.

Actions #16

Updated by Davide Pesavento over 8 years ago

That's fine I suppose.

Actions #17

Updated by Junxiao Shi over 8 years ago

  • Status changed from Code review to Closed
  • % Done changed from 0 to 100
Actions #18

Updated by Junxiao Shi over 8 years ago

  • Blocks Task #3305: UnixStreamTransport: test suite improvement added
Actions

Also available in: Atom PDF