MCPcopy Create free account
hub / github.com/amule-project/amule / DecodeServerMet

Function DecodeServerMet

src/utils/fileview/eD2kFiles.cpp:106–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void DecodeServerMet(const CFileDataIO& file)
107{
108 uint8_t version = file.ReadUInt8();
109 cout << "Version : " << VersionInfo(version, KnownFileList) << endl;
110 if (version != 0xE0 && version != MET_HEADER) {
111 cerr << "File seems to be corrupt, invalid version!" << endl;
112 return;
113 }
114 uint32_t ServerCount = file.ReadUInt32();
115 cout << "Count : " << ServerCount << '\n';
116 for (; ServerCount > 0; --ServerCount) {
117 cout << "\tIP : " << CeD2kIP(file.ReadUInt32()) << '\n';
118 cout << "\tPort : " << file.ReadUInt16() << '\n';
119 uint32_t tagCount = file.ReadUInt32();
120 cout << "\ttagCount : " << tagCount << '\n';
121 for (; tagCount > 0; --tagCount) {
122 CTag tag(file, true);
123 cout << "\t\t" << CServerTag(tag) << '\n';
124 }
125 }
126}
127
128void DecodeClientsMet(const CFileDataIO& file)
129{

Callers 1

OnRunMethod · 0.85

Calls 6

VersionInfoFunction · 0.85
CeD2kIPClass · 0.85
CServerTagClass · 0.85
ReadUInt8Method · 0.80
ReadUInt32Method · 0.80
ReadUInt16Method · 0.80

Tested by

no test coverage detected