diff options
Diffstat (limited to 'doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp')
-rw-r--r-- | doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp b/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp new file mode 100644 index 0000000..da96e6f --- /dev/null +++ b/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp @@ -0,0 +1,12 @@ +//! [0] +socket->connectToServer("market"); +if (socket->waitForConnected(1000)) + qDebug("Connected!"); +//! [0] + + +//! [1] +socket->disconnectFromServer(); +if (socket->waitForDisconnected(1000)) + qDebug("Disconnected!"); +//! [1] |