Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSocketDescriptor Class Reference

\inmodule QtCore More...

#include <qsocketnotifier.h>

+ Collaboration diagram for QSocketDescriptor:

Public Types

using DescriptorType = int
 

Public Member Functions

Q_DECL_CONSTEXPR_NOT_WIN Q_IMPLICIT QSocketDescriptor (DescriptorType descriptor=DescriptorType(-1)) noexcept
 
Q_DECL_CONSTEXPR operator DescriptorType () const noexcept
 
Q_DECL_CONSTEXPR_NOT_WIN bool isValid () const noexcept
 

Friends

Q_DECL_CONSTEXPR_NOT_WIN bool operator== (QSocketDescriptor lhs, QSocketDescriptor rhs) noexcept
 
Q_DECL_CONSTEXPR_NOT_WIN bool operator!= (QSocketDescriptor lhs, QSocketDescriptor rhs) noexcept
 

Detailed Description

\inmodule QtCore

A class which holds a native socket descriptor.

Since
5.15

QSocketDescriptor makes it easier to handle native socket descriptors in cross-platform code.

On Windows it holds a {Qt::HANDLE} and on Unix it holds an int. The class will implicitly convert between the class and the native descriptor type.

Definition at line 61 of file qsocketnotifier.h.

Member Typedef Documentation

◆ DescriptorType

Definition at line 68 of file qsocketnotifier.h.

Constructor & Destructor Documentation

◆ QSocketDescriptor()

QSocketDescriptor::QSocketDescriptor ( DescriptorType descriptor = DescriptorType(-1))
inlinenoexcept

Construct a QSocketDescriptor from a native socket descriptor.

Construct a QSocketDescriptor from a native socket descriptor.

Note
This constructor is only available on Windows.

Definition at line 73 of file qsocketnotifier.h.

Referenced by isValid().

+ Here is the caller graph for this function:

Member Function Documentation

◆ isValid()

Q_DECL_CONSTEXPR_NOT_WIN bool QSocketDescriptor::isValid ( ) const
inlinenoexcept

Definition at line 84 of file qsocketnotifier.h.

References QSocketDescriptor().

+ Here is the call graph for this function:

◆ operator DescriptorType()

Q_DECL_CONSTEXPR QSocketDescriptor::operator DescriptorType ( ) const
inlinenoexcept

Definition at line 82 of file qsocketnotifier.h.

Friends And Related Symbol Documentation

◆ operator!=

Q_DECL_CONSTEXPR_NOT_WIN bool operator!= ( QSocketDescriptor lhs,
QSocketDescriptor rhs )
friend

Definition at line 91 of file qsocketnotifier.h.

◆ operator==

Q_DECL_CONSTEXPR_NOT_WIN bool operator== ( QSocketDescriptor lhs,
QSocketDescriptor rhs )
friend

Definition at line 86 of file qsocketnotifier.h.


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