/* ######################################################################
SRV record support
-
+
##################################################################### */
/*}}}*/
#ifndef SRVREC_H
u_int16_t weight;
u_int16_t port;
+ // each server is assigned a interval [start, end] in the space of [0, max]
+ int random_number_range_start;
+ int random_number_range_end;
+ int random_number_range_max;
+
bool operator<(SrvRec const &other) const {
return this->priority < other.priority;
}
*/
bool GetSrvRecords(std::string host, int port, std::vector<SrvRec> &Result);
+/** \brief Pop a single SRV record from the vector of SrvRec taking
+ * priority and weight into account
+ */
+SrvRec PopFromSrvRecs(std::vector<SrvRec> &Recs);
+
#endif