Code cleanup.

This commit is contained in:
XMRig 2020-04-02 21:19:39 +07:00
parent 4dddd3a44f
commit 914b7023a2
No known key found for this signature in database
GPG key ID: 446A53638BE94409
3 changed files with 12 additions and 18 deletions

View file

@ -112,10 +112,11 @@ private:
void setState(SocketState state);
void startTimeout();
inline const char *url() const { return m_pool.url(); }
inline SocketState state() const { return m_state; }
inline void setExtension(Extension ext, bool enable) noexcept { m_extensions.set(ext, enable); }
template<Extension ext> inline bool has() const noexcept { return m_extensions.test(ext); }
inline const char *url() const { return m_pool.url(); }
inline SocketState state() const { return m_state; }
inline uv_stream_t *stream() const { return reinterpret_cast<uv_stream_t *>(m_socket); }
inline void setExtension(Extension ext, bool enable) noexcept { m_extensions.set(ext, enable); }
template<Extension ext> inline bool has() const noexcept { return m_extensions.test(ext); }
static void onClose(uv_handle_t *handle);
static void onConnect(uv_connect_t *req, int status);
@ -135,7 +136,6 @@ private:
uint64_t m_jobs = 0;
uint64_t m_keepAlive = 0;
uintptr_t m_key = 0;
uv_stream_t *m_stream = nullptr;
uv_tcp_t *m_socket = nullptr;
static Storage<Client> m_storage;