MCPcopy Create free account
hub / github.com/aria2/aria2 / setUp

Method setUp

test/DHTMessageFactoryImplTest.cc:57–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 unsigned char remoteNodeID[DHT_ID_LENGTH];
56
57 void setUp()
58 {
59 localNode = std::make_shared<DHTNode>();
60 factory = make_unique<DHTMessageFactoryImpl>(AF_INET);
61 factory->setLocalNode(localNode);
62 memset(transactionID, 0xff, DHT_TRANSACTION_ID_LENGTH);
63 memset(remoteNodeID, 0x0f, DHT_ID_LENGTH);
64 routingTable = make_unique<DHTRoutingTable>(localNode);
65 factory->setRoutingTable(routingTable.get());
66
67 remoteNode_ = make_unique<DHTNode>(remoteNodeID);
68 remoteNode_->setIPAddress("192.168.0.1");
69 remoteNode_->setPort(6881);
70
71 remoteNode6_ = make_unique<DHTNode>(remoteNodeID);
72 remoteNode6_->setIPAddress("2001::2001");
73 remoteNode6_->setPort(6881);
74 }
75
76 void tearDown() {}
77

Callers

nothing calls this directly

Calls 5

setIPAddressMethod · 0.80
setLocalNodeMethod · 0.45
setRoutingTableMethod · 0.45
getMethod · 0.45
setPortMethod · 0.45

Tested by

no test coverage detected