204
206
return hostname_ == serverStat.hostname_ && protocol_ == serverStat.protocol_;
207
std::ostream& operator<<(std::ostream& o, const ServerStat& serverStat)
209
std::string ServerStat::toString() const
209
o << "host=" << serverStat.getHostname() << ", "
210
<< "protocol=" << serverStat.getProtocol() << ", "
211
<< "dl_speed=" << serverStat.getDownloadSpeed() << ", "
212
<< "sc_avg_speed=" << serverStat.getSingleConnectionAvgSpeed() << ", "
213
<< "mc_avg_speed=" << serverStat.getMultiConnectionAvgSpeed() << ", "
214
<< "last_updated=" << serverStat.getLastUpdated().getTime() << ", "
215
<< "counter=" << serverStat.getCounter() << ", "
216
<< "status=" << ServerStat::STATUS_STRING[serverStat.getStatus()];
212
strappend(res, "host=", getHostname(), ", ");
213
strappend(res, "protocol=", getProtocol(), ", ");
214
strappend(res, "dl_speed=", util::uitos(getDownloadSpeed()), ", ");
215
strappend(res, "sc_avg_speed=", util::uitos(getSingleConnectionAvgSpeed()),
217
strappend(res, "mc_avg_speed=", util::uitos(getMultiConnectionAvgSpeed()),
219
strappend(res, "last_updated=", util::itos(getLastUpdated().getTime()), ", ");
220
strappend(res, "counter=", util::uitos(getCounter()), ", ");
221
strappend(res, "status=", ServerStat::STATUS_STRING[getStatus()]);
220
225
} // namespace aria2