13 #ifndef __NET_WEBENDPOINT_H__
14 #define __NET_WEBENDPOINT_H__
47 bool has_write_access,
48 unsigned short client_ip[4]);
58 return myId == other.myId;
62 return !(*
this == other);
67 void getClientIp(
unsigned short ip[4])
const;
81 void debugPrint()
const;
85 if (!hasValidStream())
87 return myStream->getFD();
94 return myIsAlive.load(std::memory_order_seq_cst);
98 myIsAlive.store(is_alive, std::memory_order_seq_cst);
102 return myProcessCount.load() > 0;
106 UT_VERIFY(myProcessCount.exchangeAdd(1) >= 0);
110 UT_VERIFY(myProcessCount.exchangeAdd(-1) >= 0);
121 unsigned short myClientIp[4];
129 int64 calcElapsedTime(time_t now)
const;
132 const char* handlerClassName();
134 unsigned myTaskCount;
137 std::atomic_bool myIsAlive;
148 #endif // __NET_WEBENDPOINT_H__
UT_SharedPtr< NET_WebEndpoint > NET_WebEndpointPtr
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
bool operator==(const NET_WebEndpoint &other) const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
NET_WebStreamPtr myStream
bool operator!=(const NET_WebEndpoint &other) const
UT_UniquePtr< NET_WebStream > NET_WebStreamPtr
SYS_FORCE_INLINE bool isAlive() const
OPENVDB_API void initialize()
Global registration of basic types.
void startProcessQueue()
We are about to placed on the queue for processing.
SYS_FORCE_INLINE bool isProcessing() const
SYS_FORCE_INLINE void setIsAlive(bool is_alive)
SYS_FORCE_INLINE void markProcessing()
SYS_FORCE_INLINE void markFinishedProcessing()
unsigned taskCount() const
bool hasValidStream() const