E-MailRelay
Public Member Functions | Static Public Member Functions | List of all members
GNet::Descriptor Class Reference

A class that encapsulates a network socket file descriptor and an associated windows event handle. More...

#include <gdescriptor.h>

Public Member Functions

 Descriptor ()
 Default constructor.
 
 Descriptor (SOCKET, HANDLE=0)
 Constructor.
 
bool valid () const
 Returns true if the socket part is valid, ignoring the handle. More...
 
SOCKET fd () const
 Returns the socket part.
 
HANDLE h () const
 Returns the handle part.
 
bool operator== (const Descriptor &other) const
 Comparison operator.
 
bool operator!= (const Descriptor &other) const
 Comparison operator.
 
bool operator< (const Descriptor &other) const
 Comparison operator.
 
void streamOut (std::ostream &) const
 Used by op<<().
 

Static Public Member Functions

static Descriptor invalid ()
 Returns a descriptor with an invalid socket part and a zero handle. More...
 

Detailed Description

A class that encapsulates a network socket file descriptor and an associated windows event handle.

Definition at line 36 of file gdescriptor.h.

Member Function Documentation

GNet::Descriptor GNet::Descriptor::invalid ( )
inlinestatic

Returns a descriptor with an invalid socket part and a zero handle.

Definition at line 108 of file gdescriptor.h.

bool GNet::Descriptor::valid ( ) const

Returns true if the socket part is valid, ignoring the handle.

Definition at line 30 of file gdescriptor_unix.cpp.


The documentation for this class was generated from the following files: