6.0.0-rc4Source

QSocketDescriptor Class

The QSocketDescriptor class wraps a native socket or file descriptor. More…

Header#include <QSocketDescriptor>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes

List of all members, including inherited members

Public Functions

QSocketDescriptor(int descriptor = -1)
operator int() const
boolisValid() const
intvalue() 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

[constexpr] QSocketDescriptor::QSocketDescriptor(int descriptor = -1)

Constructs a descriptor wrapping descriptor. The default is an invalid descriptor.

[constexpr] bool QSocketDescriptor::isValid() const

Returns true if the descriptor is not -1; otherwise returns false.

[constexpr] QSocketDescriptor::operator int() const

Returns the wrapped descriptor value.

[constexpr] int QSocketDescriptor::value() const

Returns the wrapped descriptor value.