21 #ifndef G_NET_DESCRIPTOR__H
22 #define G_NET_DESCRIPTOR__H
92 return m_fd == other.m_fd && m_handle == other.m_handle ;
98 return !(*
this == other) ;
104 return m_fd == other.m_fd ? ( m_handle < other.m_handle ) : ( m_fd < other.m_fd ) ;
116 std::ostream & operator<<( std::ostream & stream ,
const Descriptor & d )
HANDLE h() const
Returns the handle part.
static Descriptor invalid()
Returns a descriptor with an invalid socket part and a zero handle.
bool operator==(const Descriptor &other) const
Comparison operator.
bool operator<(const Descriptor &other) const
Comparison operator.
A class that encapsulates a network socket file descriptor and an associated windows event handle...
SOCKET fd() const
Returns the socket part.
Descriptor()
Default constructor.
bool valid() const
Returns true if the socket part is valid, ignoring the handle.
bool operator!=(const Descriptor &other) const
Comparison operator.
void streamOut(std::ostream &) const
Used by op<<().