diff options
author | Don Kjer <don@lindenlab.com> | 2007-07-02 17:10:30 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-07-02 17:10:30 +0000 |
commit | e5124431b54d4342d4677371fccca5bc7250c079 (patch) | |
tree | 8c9636e78e93cef6ed099d9abd72ec9ccbbf35fe /indra/newview/llsrv.h | |
parent | ce5e13630cd8f4174549a3ec4ae8c24eec90bb3d (diff) |
svn merge -r 64079:64548 svn+ssh://svn/svn/linden/branches/maintenance into release
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); |