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
src_network_socket_qnativesocketengine.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
8// returns false
9
12// returns true
14
15
22 // a client is connected
23}
static constexpr auto IPv4Protocol
The QNativeSocketEngine class provides low level access to a socket.
qintptr accept() override
Accepts a pending connection from the socket, which must be in ListeningState, and returns its socket...
bool listen(int backlog) override
Prepares a TCP server for accepting incoming connections.
bool waitForRead(QDeadlineTimer deadline=QDeadlineTimer{DefaultTimeout}, bool *timedOut=nullptr) override
Waits until deadline has expired or until the socket is ready for reading.
bool connectToHost(const QHostAddress &address, quint16 port) override
Connects to the IP address and port specified by address and port.
bool bind(const QHostAddress &address, quint16 port) override
Binds the socket to the address address and port port.
bool waitForWrite(QDeadlineTimer deadline=QDeadlineTimer{DefaultTimeout}, bool *timedOut=nullptr) override
Waits until deadline has expired or until the socket is ready for writing.
bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol=QAbstractSocket::IPv4Protocol) override
Initializes a QNativeSocketEngine by creating a new socket of type socketType and network layer proto...
QNativeSocketEngine socketLayer
[0]
QUdpSocket clientSocket
[0]