Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
src_network_socket_qabstractsocket.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
4
//! [0]
5
socket->connectToHost(
"imap"
, 143);
6
if
(socket->waitForConnected(1000))
7
qDebug(
"Connected!"
);
8
//! [0]
9
10
11
//! [1]
12
socket->disconnectFromHost();
13
if
(socket->state() == QAbstractSocket::UnconnectedState
14
|| socket->waitForDisconnected(1000)) {
15
qDebug(
"Disconnected!"
);
16
}
17
//! [1]
18
19
20
//! [2]
21
socket->setProxy(QNetworkProxy::NoProxy);
22
//! [2]
qtbase
src
network
doc
snippets
code
src_network_socket_qabstractsocket.cpp
Generated on
for Qt by
1.18.0