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_qlocalsocket_unix.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
5socket->connectToServer("market");
6if (socket->waitForConnected(1000))
7 qDebug("Connected!");
9
10
12socket->disconnectFromServer();
14 || socket->waitForDisconnected(1000)) {
15 qDebug("Disconnected!");
16}
virtual bool waitForDisconnected(int msecs=30000)
Waits until the socket has disconnected, up to msecs milliseconds.
virtual bool waitForConnected(int msecs=30000)
Waits until the socket is connected, up to msecs milliseconds.
SocketState state() const
Returns the state of the socket.
#define qDebug
[1]
Definition qlogging.h:164
QTcpSocket * socket
[1]