QSocketDescriptor Class
The QSocketDescriptor class wraps a native socket or file descriptor. More…
| Header | #include <QSocketDescriptor> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
List of all members, including inherited members
Public Functions
| QSocketDescriptor(int descriptor = -1) | |
| operator int() const | |
| bool | isValid() const |
| int | value() const |
Detailed Description
It is passed to QSocketNotifier::activated() and converts implicitly to int.
See also QSocketNotifier.
Differences from Qt
The descriptor type is always int; there is no platform-dependent DescriptorType and no Windows handle support.
Member Function Documentation
QSocketDescriptor::QSocketDescriptor(int descriptor = -1)
Constructs a descriptor wrapping descriptor. The default is an invalid descriptor.
bool QSocketDescriptor::isValid() const
Returns true if the descriptor is not -1; otherwise returns false.
QSocketDescriptor::operator int() const
Returns the wrapped descriptor value.
int QSocketDescriptor::value() const
Returns the wrapped descriptor value.