diff options
Diffstat (limited to 'indra/newview/llsrv.h')
-rw-r--r-- | indra/newview/llsrv.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llsrv.h b/indra/newview/llsrv.h index 14a64e639e..fde4f3915d 100644 --- a/indra/newview/llsrv.h +++ b/indra/newview/llsrv.h @@ -21,6 +21,7 @@ protected: std::string mTarget; U16 mPort; +public: LLSRVRecord(U16 priority, U16 weight, const std::string& target, U16 port) : mPriority(priority), @@ -28,16 +29,30 @@ protected: mTarget(target), mPort(port) { } - -public: + U16 priority() const { return mPriority; } U16 weight() const { return mWeight; } const std::string& target() const { return mTarget; } U16 port() const { return mPort; } + + struct ComparePriorityLowest + { + bool operator()(const LLSRVRecord& lhs, const LLSRVRecord& rhs) + { + return lhs.mPriority < rhs.mPriority; + } + }; }; class LLSRV { +protected: +#ifndef LL_WINDOWS + static std::vector<LLSRVRecord> parseResponse(const unsigned char *response, + int resp_len); +#endif + static std::vector<LLSRVRecord> reorder(std::vector<LLSRVRecord>& recs); + public: static std::vector<LLSRVRecord> query(const std::string& name); static std::vector<std::string> rewriteURI(const std::string& uri); |