mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 14:07:37 +03:00
Rewritten DHTRoutingTableSerializer using stdio instead of stream.
This commit is contained in:
parent
f141cd4228
commit
dea7a7969c
5 changed files with 55 additions and 49 deletions
|
@ -55,9 +55,7 @@ void DHTRoutingTableDeserializerTest::testDeserialize()
|
|||
s.setNodes(nodes);
|
||||
|
||||
std::string filename = A2_TEST_OUT_DIR"/aria2_DHTRoutingTableDeserializerTest_testDeserialize";
|
||||
std::ofstream outfile(filename.c_str(), std::ios::binary);
|
||||
s.serialize(outfile);
|
||||
outfile.close();
|
||||
s.serialize(filename);
|
||||
|
||||
DHTRoutingTableDeserializer d(AF_INET);
|
||||
d.deserialize(filename);
|
||||
|
@ -96,9 +94,7 @@ void DHTRoutingTableDeserializerTest::testDeserialize6()
|
|||
s.setNodes(nodes);
|
||||
|
||||
std::string filename = A2_TEST_OUT_DIR"/aria2_DHTRoutingTableDeserializerTest_testDeserialize6";
|
||||
std::ofstream outfile(filename.c_str(), std::ios::binary);
|
||||
s.serialize(outfile);
|
||||
outfile.close();
|
||||
s.serialize(filename);
|
||||
|
||||
DHTRoutingTableDeserializer d(AF_INET6);
|
||||
d.deserialize(filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue