Commit Graph
12 Commits
Author SHA1 Message Date
Junxiao Shi 61e3cc51ed faces: Channel base class
refs #1261

Change-Id: If17037c4802cb6ccec0201c3bff7fc4b6db41c6a
2014-03-05 11:56:10 -07:00
Junxiao Shi 7e2413b959 tests: use LimitedIo API for time or IO limits
Change-Id: Id5cc1cea9bf1329e730d92c4099e80adbfc0f500
2014-03-03 11:56:07 -07:00
Alexander Afanasyev 5f1ec25245 face: Minor updates of TCP faces
Change-Id: I9a11fb4b2cd1aaaa670313cab0b08f097554e1fc
2014-02-28 16:12:46 -08:00
Alexander Afanasyev d665530904 face: Adding new 'createFace' method in all Factories
This method accepts parsed URI object and attempts to create Face on the
right channel (e.g., if hostname in URI resolved to IPv6, IPv6 TCP channel
will be used).

Factories that do not support 'createFace' operation will throw an exception.

As of this commit, *Factory::create methods are renamed to more explicit
*Factory::createChannel, and *Factory::connect to *Factory::createFace.
All other Factory-specific methods should denote what exactly is
created: channel, face, or multicast face.

Change-Id: I6396dc84c4cd8bbcdde9f55cfac90635d99e93e9
Refs: #1195
2014-02-28 16:12:12 -08:00
Alexander Afanasyev 0eb70659f7 face: Rename all ChannelFactories to protocol Factories
Base class is ProtocolFactory and implementations are TcpFactory,
UnixStreamFactory, EthernetFactory.

Since Factories are doing more than just creating channels (some can
create faces directly), more general name is more appropriate.

Change-Id: I3d6c2460a1b29e244f8462453720f4e7785893ca
2014-02-28 12:54:16 -08:00
Alexander Afanasyev 7329e02f60 face: Convert to use the global IO service by all ChannelFactories
Change-Id: Ibd8d5cea142171b5700d8920eb3eedc084bbd588
2014-02-28 11:04:40 -08:00
Junxiao Shi d9ee45c952 tests: resetGlobalIoService for every test
All tests must use BaseFixture or a fixture derived from it to get this feature.

This commit also fixes a few warnings in tests/mgmt, and moves test cases into nfd::tests namespace.

refs #1290

Change-Id: I891441a5abce170e35648d463f7157b18429f79f
2014-02-27 19:36:19 -07:00
Alexander Afanasyev c1e2ee07fa tests: Making Scheduler and TCP test cases more resilient to time
These two tests were frequently falsely failing on overloaded build bots

Change-Id: I4e6dc09a647317514a7318e09bb095c7d7e6045a
2014-02-25 17:05:45 -08:00
Alexander Afanasyev bd220a053b face: Implementation of encode/decode of LocalControlHeader
LocalControlHeader can only be used on faces that are derived from
LocalFace.  UnixStreamFace is directly inherited from LocalFace,
TCP face has two specializations: generic TcpFace (strictly not local),
and LocalTcpFace.

refs #1213

Change-Id: I8a158c3bc4bb929eedd15757cfddecc0d1049f9f
2014-02-20 15:54:22 -08:00
Alexander Afanasyev a0a10fb081 face: Implementing close operation and many related fixes in TcpFace and TcpChannel
Change-Id: Ib6b751e80454e149bf94f3867663d5e705cbf4a0
refs: #1250, #1248
2014-02-14 10:00:50 -08:00
Alexander Afanasyev a16abd2822 face/tcp: Fixing multiple accept on a channel
Also, this commit includes more thorough test for TCP channel (testing
if multiple connections can be made to the same channel).

Change-Id: I3b89a6d994b5b17286448013aa04a77c92c0267a
refs: #1134
2014-01-31 18:13:36 -08:00
Junxiao Shi 96dc0c49ac face: TCP end-to-end test case
The test case uses an additional Scheduler-based guard to protect
against potential communication failures.

Change-Id: I46b906f4882bfcc717b8d4a3bf074b494a39cf8d
refs: #1173
2014-01-31 17:24:23 -08:00